xunge/DecIR huggingface dataset:
call2g(l, d2, c, f1, s, d1, i, f2) long l;
double d2;
char c;
float f1;
short s;
double d1;
int i;
float f2;
{
  c = 'a';
  f1 = 0.0;
  s = 5;
  d1 = 0.0;
  i = 6;
  f2 = 0.1;
  l = 7;
  d2 = 0.2;
}


x86 assembly (clang, -O0):
<call2g>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm3,-0x40(%rbp)
mov    %edx,%eax
movaps %xmm0,%xmm3
movsd  -0x40(%rbp),%xmm0
mov    %sil,%dl
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
mov    %rdi,-0x10(%rbp)
movsd  %xmm3,-0x18(%rbp)
mov    %dl,-0x19(%rbp)
movss  %xmm1,-0x20(%rbp)
mov    %ax,-0x22(%rbp)
movsd  %xmm2,-0x30(%rbp)
mov    %ecx,-0x34(%rbp)
movss  %xmm0,-0x38(%rbp)
movb   $0x61,-0x19(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movw   $0x5,-0x22(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x6,-0x34(%rbp)
movss  0xe9f(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
movq   $0x7,-0x10(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call2g>:
ret

LLVM IR (-O0):
define i32 @call2g(i64 %0, double %1, i32 %2, double %3, i32 %4, double %5, i32 %6, double %7) {
%9 = alloca i32
%10 = alloca i64
%11 = alloca double
%12 = alloca i8
%13 = alloca float
%14 = alloca i16
%15 = alloca double
%16 = alloca i32
%17 = alloca float
%18 = trunc i32 %2 to i8
%19 = fptrunc double %3 to float
%20 = trunc i32 %4 to i16
%21 = fptrunc double %7 to float
store i64 %0, i64* %10
store double %1, double* %11
store i8 %18, i8* %12
store float %19, float* %13
store i16 %20, i16* %14
store double %5, double* %15
store i32 %6, i32* %16
store float %21, float* %17
store i8 97, i8* %12
store float 0.000000e+00, float* %13
store i16 5, i16* %14
store double 0.000000e+00, double* %15
store i32 6, i32* %16
store float 0x3FB99999A0000000, float* %17
store i64 7, i64* %10
store double 2.000000e-01, double* %11
%22 = load i32, i32* %9
ret i32 %22
}

LLVM IR (-O2):
define i32 @call2g(i64 %0, double %1, i32 %2, double %3, i32 %4, double %5, i32 %6, double %7) {
ret i32 undef
}
int main(int argc, char **argv) {
  int r;
#pragma omp target enter data
#pragma omp target enter data map(r)
#pragma omp target enter data map(tofrom : r)
#pragma omp target enter data map(always, to : r) allocate(r)
#pragma omp target enter data map(always, alloc : r)
#pragma omp target enter data map(always, from : r)
#pragma omp target enter data map(release : r)
#pragma omp target enter data map(delete : r)
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ isascii(int);
scalar_t__ isupper(int);
int Cisupper(int c) { return isascii(c) && isupper(c); }


x86 assembly (clang, -O0):
<Cisupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isascii@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1157 <Cisupper+0x37>
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cisupper>:
push   %rbx
mov    %edi,%ebx
call   1040 <isascii@plt>
test   %rax,%rax
je     1141 <Cisupper+0x21>
mov    %ebx,%edi
call   1030 <isupper@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Cisupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isascii(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isupper(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @Cisupper(i32 %0) {
%2 = tail call i64 @isascii(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @isupper(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_cpl(void) { op_write1(0x2f); }


x86 assembly (clang, -O0):
<op_enc_cpl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_cpl>:
mov    $0x2f,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_cpl() {
%1 = call i32 @op_write1(i32 47)
ret void
}

LLVM IR (-O2):
define void @op_enc_cpl() {
%1 = tail call i32 @op_write1(i32 47)
ret void
}
int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
                          int stream) {
  return 0;
}


x86 assembly (clang, -O0):
<media_snd_stream_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<media_snd_stream_init>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.snd_usb_substream = type opaque
%struct.snd_pcm = type opaque
define i32 @media_snd_stream_init(%struct.snd_usb_substream* %0, %struct.snd_pcm* %1, i32 %2) {
%4 = alloca %struct.snd_usb_substream*
%5 = alloca %struct.snd_pcm*
%6 = alloca i32
store %struct.snd_usb_substream* %0, %struct.snd_usb_substream** %4
store %struct.snd_pcm* %1, %struct.snd_pcm** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.snd_usb_substream = type opaque
%struct.snd_pcm = type opaque
define i32 @media_snd_stream_init(%struct.snd_usb_substream* nocapture readnone %0, %struct.snd_pcm* nocapture readnone %1, i32 %2) {
ret i32 0
}
int init_internal_IRQ(void) { return 0; }


x86 assembly (clang, -O0):
<init_internal_IRQ>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_internal_IRQ>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @init_internal_IRQ() {
ret i32 0
}

LLVM IR (-O2):
define i32 @init_internal_IRQ() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fillcircle(int, int, int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basFillCircle() {
  int x, y, r;
  r = popNumber();
  y = popNumber();
  x = popNumber();
  pushNumber(fillcircle(x, y, r));
}


x86 assembly (clang, -O0):
<basFillCircle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <fillcircle@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basFillCircle>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <fillcircle@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basFillCircle() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %3
%5 = call i32 (...) @popNumber()
store i32 %5, i32* %2
%6 = call i32 (...) @popNumber()
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @fillcircle(i32 %7, i32 %8, i32 %9)
%11 = call i32 @pushNumber(i32 %10)
ret void
}

LLVM IR (-O2):
define void @basFillCircle() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 (...) @popNumber()
%4 = tail call i32 @fillcircle(i32 %3, i32 %2, i32 %1)
%5 = tail call i32 @pushNumber(i32 %4)
ret void
}
/* Variables and functions */
int write(int, void const *, int);
int osslib_write(int fd, const void *buf, int count) {
  return write(fd, buf, count);
}


x86 assembly (clang, -O0):
<osslib_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osslib_write>:
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @osslib_write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @write(i32 %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @osslib_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int const, int);
int /*<<< orphan*/ stderr;
void *thread_fn(void *p) {
  const int *arg = p;
  fprintf(stderr, "Hello from thread %d, nthreads %d\n", *arg, 4);
  return NULL;
}


x86 assembly (clang, -O0):
<thread_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xec6(%rip),%rsi
mov    $0x4,%ecx
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_fn>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%edx
lea    0xedd(%rip),%rsi
mov    %eax,%edi
mov    $0x4,%ecx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Hello from thread %d, nthreads %d\0A\00"
define i8* @thread_fn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32, i32* @stderr
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %8, i32 4)
ret i8* null
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Hello from thread %d, nthreads %d\0A\00"
define noalias i8* @thread_fn(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %4, i32 4)
ret i8* null
}
int cmp1(const void *a, const void *b) { return *(int *)a - *(int *)b; }


x86 assembly (clang, -O0):
<cmp1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp1>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @cmp1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp1(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ csk_echo_off();
int /*<<< orphan*/ csk_echo_on();
char *csk_get_stdin();
int /*<<< orphan*/ printf(char *, ...);
char *csk_get_passphrase(char *prompt) {
  printf("%s: ", prompt);
  csk_echo_off();
  char *line = csk_get_stdin();
  csk_echo_on();
  printf("\n");
  return line;
}


x86 assembly (clang, -O0):
<csk_get_passphrase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <csk_echo_off@plt>
mov    $0x0,%al
call   1060 <csk_get_stdin@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <csk_echo_on@plt>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csk_get_passphrase>:
push   %rbx
mov    %rdi,%rsi
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1040 <csk_echo_off@plt>
xor    %eax,%eax
call   1070 <csk_get_stdin@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <csk_echo_on@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s: \00"
@.str.1 = [2 x i8] c"\0A\00"
define i8* @csk_get_passphrase(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @csk_echo_off()
%7 = call i8* (...) @csk_get_stdin()
store i8* %7, i8** %3
%8 = call i32 (...) @csk_echo_on()
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s: \00"
define i8* @csk_get_passphrase(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @csk_echo_off()
%4 = tail call i8* (...) @csk_get_stdin()
%5 = tail call i32 (...) @csk_echo_on()
%6 = tail call i32 @putchar(i32 10)
ret i8* %4
}
unsigned short int getshort(unsigned char *buffer, int offset) {
  return (unsigned short int)buffer[offset] |
         ((unsigned short int)buffer[offset + 1] << 8);
}


x86 assembly (clang, -O0):
<getshort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movzwl %ax,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
movzwl %cx,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getshort>:
movslq %esi,%rax
movzwl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define zeroext i16 @getshort(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i16
%11 = zext i16 %10 to i32
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i16
%19 = zext i16 %18 to i32
%20 = shl i32 %19, 8
%21 = or i32 %11, %20
%22 = trunc i32 %21 to i16
ret i16 %22
}

LLVM IR (-O2):
define zeroext i16 @getshort(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = add nsw i32 %1, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i16
%12 = shl nuw i16 %11, 8
%13 = or i16 %12, %6
ret i16 %13
}
int msem_init(int *sem, int val) {
  *sem = val;
  return 1;
}


x86 assembly (clang, -O0):
<msem_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<msem_init>:
mov    %esi,(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @msem_init(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
store i32 %5, i32* %6
ret i32 1
}

LLVM IR (-O2):
define i32 @msem_init(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void ez_panic(const char *_str) { printf("%s\n", _str); }


x86 assembly (clang, -O0):
<ez_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ez_panic>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @ez_panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @ez_panic(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ i2c_write(unsigned char *, int);
int register_write(unsigned char reg, unsigned char data) {
  int rc = -1;
  unsigned char bite[4];
  bite[0] = reg;
  bite[1] = data;
  if (i2c_write(bite, 2) == 0) {
    rc = 0;
  }
  return rc;
}


x86 assembly (clang, -O0):
<register_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0xc(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0xb(%rbp)
lea    -0xc(%rbp),%rdi
mov    $0x2,%esi
call   1030 <i2c_write@plt>
cmp    $0x0,%rax
jne    1156 <register_write+0x46>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_write>:
push   %rax
mov    %dil,0x4(%rsp)
mov    %sil,0x5(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x2,%esi
call   1030 <i2c_write@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @register_write(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca [4 x i8]
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 -1, i32* %5
%7 = load i8, i8* %3
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i8, i8* %4
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
store i8 %9, i8* %10
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%12 = call i64 @i2c_write(i8* %11, i32 2)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 0, i32* %5
br label %15
15: ; preds = %14, %2
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @register_write(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 %0, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 %1, i8* %5
%6 = call i64 @i2c_write(i8* %4, i32 2)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int EOF;
int getchar();
int __kbhit() {
  int key;
  key = getchar();
  if (key != EOF)
    return key;
}


x86 assembly (clang, -O0):
<__kbhit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ebc(%rip),%rcx
cmp    (%rcx),%eax
je     113a <__kbhit+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__kbhit>:
xor    %eax,%eax
jmp    1030 <getchar@plt>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @__kbhit() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i32, i32* %2
store i32 %8, i32* %1
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @__kbhit() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ diminuto_ipcl_datagram_receive_generic(int, void *, size_t,
                                                          char *,
                                                          int /*<<< orphan*/,
                                                          int /*<<< orphan*/);
ssize_t diminuto_ipcl_datagram_receive(int fd, void *buffer, size_t size) {
  return diminuto_ipcl_datagram_receive_generic(fd, buffer, size, (char *)0, 0,
                                                0);
}


x86 assembly (clang, -O0):
<diminuto_ipcl_datagram_receive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <diminuto_ipcl_datagram_receive_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipcl_datagram_receive>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <diminuto_ipcl_datagram_receive_generic@plt>

LLVM IR (-O0):
define i32 @diminuto_ipcl_datagram_receive(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @diminuto_ipcl_datagram_receive_generic(i32 %7, i8* %8, i64 %9, i8* null, i32 0, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @diminuto_ipcl_datagram_receive(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @diminuto_ipcl_datagram_receive_generic(i32 %0, i8* %1, i64 %2, i8* null, i32 0, i32 0)
ret i32 %4
}
int int_sorter(const void *first_arg, const void *second_arg) {
  int first = *(int *)first_arg;
  int second = *(int *)second_arg;
  if (first < second) {
    return -1;
  } else if (first == second) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<int_sorter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1136 <int_sorter+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <int_sorter+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    114e <int_sorter+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1155 <int_sorter+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_sorter>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @int_sorter(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 0, i32* %3
br label %24
23: ; preds = %18
store i32 1, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @int_sorter(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strlen(char const *);
char *strdup(const char *s) {
  char *s2;
  size_t length;
  length = strlen(s);
  s2 = (char *)malloc(length + 1);
  if (s2 == NULL) {
    return NULL;
  }
  memcpy(s2, s, length + 1);
  return s2;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1172 <strdup+0x42>
movq   $0x0,-0x8(%rbp)
jmp    118f <strdup+0x5f>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
add    $0x1,%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1164 <strdup+0x34>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
jmp    1167 <strdup+0x37>
xor    %r15d,%r15d
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = add i64 %8, 1
%10 = call i64 @malloc(i64 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %15
14: ; preds = %1
store i8* null, i8** %2
br label %22
15: ; preds = %1
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = load i64, i64* %5
%19 = add i64 %18, 1
%20 = call i32 @memcpy(i8* %16, i8* %17, i64 %19)
%21 = load i8*, i8** %4
store i8* %21, i8** %2
br label %22
22: ; preds = %15, %14
%23 = load i8*, i8** %2
ret i8* %23
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %3)
br label %9
9: ; preds = %1, %7
%10 = phi i8* [ %5, %7 ], [ null, %1 ]
ret i8* %10
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t z80_cb_e0_set_4(uint8_t value) { return value | 0x10; }


x86 assembly (clang, -O0):
<z80_cb_e0_set_4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<z80_cb_e0_set_4>:
mov    %edi,%eax
or     $0x10,%eax
ret

LLVM IR (-O0):
define i32 @z80_cb_e0_set_4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = or i32 %3, 16
ret i32 %4
}

LLVM IR (-O2):
define i32 @z80_cb_e0_set_4(i32 %0) {
%2 = or i32 %0, 16
ret i32 %2
}
int plus5(int i) { return i + 5; }


x86 assembly (clang, -O0):
<plus5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x5,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plus5>:
lea    0x5(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @plus5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 5
ret i32 %4
}

LLVM IR (-O2):
define i32 @plus5(i32 %0) {
%2 = add nsw i32 %0, 5
ret i32 %2
}
/* Variables and functions */
char EOF;
char fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(void) {
  char ch;
  while ((ch = fgetc(stdin)) != EOF) {
    if (ch == ' ')
      ch = '_';
    fputc(ch, stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2e96(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     117f <main+0x5f>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1166 <main+0x46>
movb   $0x5f,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    0x2e60(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1040 <fputc@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2eba(%rip),%r14
mov    (%r14),%edi
call   1030 <fgetc@plt>
mov    0x2ea3(%rip),%r15
cmp    (%r15),%al
je     116f <main+0x4f>
mov    $0x5f,%ebp
mov    0x2e82(%rip),%rbx
xchg   %ax,%ax
cmp    $0x20,%al
movzbl %al,%eax
cmove  %ebp,%eax
mov    (%rbx),%esi
movsbl %al,%edi
call   1040 <fputc@plt>
mov    (%r14),%edi
call   1030 <fgetc@plt>
cmp    (%r15),%al
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@EOF = global i8 0
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* @stdin
%5 = call signext i8 @fgetc(i32 %4)
store i8 %5, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* @EOF
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %6, %8
br i1 %9, label %10, label %19
10: ; preds = %3
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 32
br i1 %13, label %14, label %15
14: ; preds = %10
store i8 95, i8* %2
br label %15
15: ; preds = %14, %10
%16 = load i8, i8* %2
%17 = load i32, i32* @stdout
%18 = call i32 @fputc(i8 signext %16, i32 %17)
br label %3
19: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@EOF = global i8 0
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call signext i8 @fgetc(i32 %1)
%3 = load i8, i8* @EOF
%4 = icmp eq i8 %2, %3
br i1 %4, label %15, label %5
5: ; preds = %0, %5
%6 = phi i8 [ %12, %5 ], [ %2, %0 ]
%7 = icmp eq i8 %6, 32
%8 = select i1 %7, i8 95, i8 %6
%9 = load i32, i32* @stdout
%10 = tail call i32 @fputc(i8 signext %8, i32 %9)
%11 = load i32, i32* @stdin
%12 = tail call signext i8 @fgetc(i32 %11)
%13 = load i8, i8* @EOF
%14 = icmp eq i8 %12, %13
br i1 %14, label %15, label %5
15: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void header_out(void) {
  printf(
      "#FIG 3.2\nLandscape\nCenter\nMetric\nA4\n100.00\nSingle\n-2\n1200 2\n");
}


x86 assembly (clang, -O0):
<header_out>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<header_out>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"#FIG 3.2\0ALandscape\0ACenter\0AMetric\0AA4\0A100.00\0ASingle\0A-2\0A1200 2\0A\00"
define void @header_out() {
%1 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [60 x i8] c"#FIG 3.2\0ALandscape\0ACenter\0AMetric\0AA4\0A100.00\0ASingle\0A-2\0A1200 2\00"
define void @header_out() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
ret void
}
int main() {
  char out = 0x55;
  __asm__("movl $0x42, %%eax; cmpl $0x24, %%eax; seto %%al" : "=a"(out));
  return out;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x55,-0x5(%rbp)
mov    $0x42,%eax
cmp    $0x24,%eax
seto   %al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x42,%eax
cmp    $0x24,%eax
seto   %al
movsbl %al,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 85, i8* %2
%3 = call i8 asm "movl $$0x42, %eax; cmpl $$0x24, %eax; seto %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8 asm "movl $$0x42, %eax; cmpl $$0x24, %eax; seto %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
%2 = sext i8 %1 to i32
ret i32 %2
}
void print_emc_profile(const char *profile, const int size) {}


x86 assembly (clang, -O0):
<print_emc_profile>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_emc_profile>:
ret

LLVM IR (-O0):
define void @print_emc_profile(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @print_emc_profile(i8* nocapture %0, i32 %1) {
ret void
}
void dd_pbl_ios_gc_auth() {}


x86 assembly (clang, -O0):
<dd_pbl_ios_gc_auth>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_pbl_ios_gc_auth>:
ret

LLVM IR (-O0):
define void @dd_pbl_ios_gc_auth() {
ret void
}

LLVM IR (-O2):
define void @dd_pbl_ios_gc_auth() {
ret void
}
int StringComparisonOutputInt(int first, int second, int isSmallerOrGreater) {
  if (first == second)
    return 2;
  int output = 0;
  if (isSmallerOrGreater == 0) {
    output = (first < second ? 1 : 0);
  } else
    output = (first > second ? 1 : 0);
  return output;
}


x86 assembly (clang, -O0):
<StringComparisonOutputInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1125 <StringComparisonOutputInt+0x25>
movl   $0x2,-0x4(%rbp)
jmp    116b <StringComparisonOutputInt+0x6b>
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1150 <StringComparisonOutputInt+0x50>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1165 <StringComparisonOutputInt+0x65>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringComparisonOutputInt>:
mov    $0x2,%eax
cmp    %esi,%edi
je     111d <StringComparisonOutputInt+0x1d>
setl   %al
setg   %cl
test   %edx,%edx
movzbl %al,%eax
movzbl %cl,%ecx
cmove  %eax,%ecx
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @StringComparisonOutputInt(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 2, i32* %4
br label %30
13: ; preds = %3
store i32 0, i32* %8
%14 = load i32, i32* %7
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 1, i32 0
store i32 %21, i32* %8
br label %28
22: ; preds = %13
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = icmp sgt i32 %23, %24
%26 = zext i1 %25 to i64
%27 = select i1 %25, i32 1, i32 0
store i32 %27, i32* %8
br label %28
28: ; preds = %22, %16
%29 = load i32, i32* %8
store i32 %29, i32* %4
br label %30
30: ; preds = %28, %12
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @StringComparisonOutputInt(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %1
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = icmp eq i32 %2, 0
%7 = icmp slt i32 %0, %1
%8 = icmp sgt i32 %0, %1
%9 = select i1 %6, i1 %7, i1 %8
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %3, %5
%12 = phi i32 [ %10, %5 ], [ 2, %3 ]
ret i32 %12
}
/* Variables and functions */
int mystery(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main(void) {
  unsigned x;
  printf("Enter an integer: ");
  scanf("%u", &x);
  printf("The result is %d\n", mystery(x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <mystery@plt>
mov    %eax,%esi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <mystery@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter an integer: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [18 x i8] c"The result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @mystery(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter an integer: \00"
@.str.1 = [3 x i8] c"%u\00"
@.str.2 = [18 x i8] c"The result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @mystery(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CTEST_ERR(char *, char const *, int);
void assert_not_null(const void *real, const char *caller, int line) {
  if (real == NULL) {
    CTEST_ERR("%s:%d  should not be NULL", caller, line);
  }
}


x86 assembly (clang, -O0):
<assert_not_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1141 <assert_not_null+0x31>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xec4(%rip),%rdi
call   1030 <CTEST_ERR@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_not_null>:
test   %rdi,%rdi
je     1116 <assert_not_null+0x6>
ret
lea    0xee3(%rip),%rdi
jmp    1030 <CTEST_ERR@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"%s:%d should not be NULL\00"
define void @assert_not_null(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @CTEST_ERR(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11)
br label %13
13: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%s:%d should not be NULL\00"
define void @assert_not_null(i8* readnone %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @CTEST_ERR(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SEQ_START_NOTE(int /*<<< orphan*/, int, int, int);
void seq_noteon(int chn, int note, int vol) {
  SEQ_START_NOTE(0, chn, note, vol);
}


x86 assembly (clang, -O0):
<seq_noteon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
call   1030 <SEQ_START_NOTE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_noteon>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <SEQ_START_NOTE@plt>

LLVM IR (-O0):
define void @seq_noteon(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @SEQ_START_NOTE(i32 0, i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @seq_noteon(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @SEQ_START_NOTE(i32 0, i32 %0, i32 %1, i32 %2)
ret void
}
int conv(short value, unsigned short factor) {
  int v;
  v = ((long)value * factor) >> 11;
  v = (v + 1) / 2;
  return (v);
}


x86 assembly (clang, -O0):
<conv>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswq -0x2(%rbp),%rax
movzwl -0x4(%rbp),%ecx
imul   %rcx,%rax
sar    $0xb,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv>:
movslq %edi,%rax
mov    %esi,%ecx
imul   %rax,%rcx
shr    $0xb,%rcx
mov    %ecx,%eax
add    $0x1,%eax
shr    $0x1f,%eax
add    %ecx,%eax
add    $0x1,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @conv(i16 signext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i32
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = sext i16 %6 to i64
%8 = load i16, i16* %4
%9 = zext i16 %8 to i64
%10 = mul nsw i64 %7, %9
%11 = ashr i64 %10, 11
%12 = trunc i64 %11 to i32
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = sdiv i32 %14, 2
store i32 %15, i32* %5
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @conv(i16 signext %0, i16 zeroext %1) {
%3 = sext i16 %0 to i64
%4 = zext i16 %1 to i64
%5 = mul nsw i64 %4, %3
%6 = ashr i64 %5, 11
%7 = trunc i64 %6 to i32
%8 = add nsw i32 %7, 1
%9 = sdiv i32 %8, 2
ret i32 %9
}
int getParent(int p) {
  if (p == 0)
    return -1;
  return (int)((p - 1) / 2);
}


x86 assembly (clang, -O0):
<getParent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <getParent+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    112e <getParent+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getParent>:
test   %edi,%edi
je     1114 <getParent+0x14>
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @getParent(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = sdiv i32 %9, 2
store i32 %10, i32* %2
br label %11
11: ; preds = %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @getParent(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = sdiv i32 %4, 2
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ _trans(int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, const char *argv[]) {
  int num, k;
  scanf("%d %d", &num, &k);
  _trans(num, k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <_trans@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <_trans@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = call i32 @_trans(i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @_trans(i32 %8, i32 %9)
ret i32 0
}
int test_imm_E6uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xE6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E6uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xe6,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E6uint64_midword_mem>:
testb  $0xe6,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E6uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 230
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_E6uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 15073280
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ Lookup_Hex_Low(int);
int /*<<< orphan*/ VT_Transmit(int /*<<< orphan*/);
void VT_Print_Hex_Val(uint8_t hex) {
  VT_Transmit(Lookup_Hex_Low(hex >> 4));
  VT_Transmit(Lookup_Hex_Low(hex));
}


x86 assembly (clang, -O0):
<VT_Print_Hex_Val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x4,%edi
call   1040 <Lookup_Hex_Low@plt>
mov    %eax,%edi
call   1030 <VT_Transmit@plt>
mov    -0x4(%rbp),%edi
call   1040 <Lookup_Hex_Low@plt>
mov    %eax,%edi
call   1030 <VT_Transmit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VT_Print_Hex_Val>:
push   %rbx
mov    %edi,%ebx
sar    $0x4,%edi
call   1040 <Lookup_Hex_Low@plt>
mov    %eax,%edi
call   1030 <VT_Transmit@plt>
mov    %ebx,%edi
call   1040 <Lookup_Hex_Low@plt>
mov    %eax,%edi
pop    %rbx
jmp    1030 <VT_Transmit@plt>

LLVM IR (-O0):
define void @VT_Print_Hex_Val(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = call i32 @Lookup_Hex_Low(i32 %4)
%6 = call i32 @VT_Transmit(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @Lookup_Hex_Low(i32 %7)
%9 = call i32 @VT_Transmit(i32 %8)
ret void
}

LLVM IR (-O2):
define void @VT_Print_Hex_Val(i32 %0) {
%2 = ashr i32 %0, 4
%3 = tail call i32 @Lookup_Hex_Low(i32 %2)
%4 = tail call i32 @VT_Transmit(i32 %3)
%5 = tail call i32 @Lookup_Hex_Low(i32 %0)
%6 = tail call i32 @VT_Transmit(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR53_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_WMR53_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <U_WMRNOTIMPLEMENTED_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMR53_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR53_swap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMR53_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}