xunge/DecIR huggingface dataset:
/* Variables and functions */
float lerp1(float, float, float);
float lerp2(float a, float b, float c, float d, float s, float t) {
  return lerp1(lerp1(a, b, t), lerp1(c, d, t), s);
}


x86 assembly (clang, -O0):
<lerp2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
call   1030 <lerp1@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
call   1030 <lerp1@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
call   1030 <lerp1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lerp2>:
sub    $0x18,%rsp
movss  %xmm5,0x4(%rsp)
movss  %xmm4,0x14(%rsp)
movss  %xmm3,0x10(%rsp)
movss  %xmm2,0xc(%rsp)
movaps %xmm5,%xmm2
call   1030 <lerp1@plt>
movss  %xmm0,0x8(%rsp)
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
call   1030 <lerp1@plt>
movaps %xmm0,%xmm1
movss  0x8(%rsp),%xmm0
movss  0x14(%rsp),%xmm2
add    $0x18,%rsp
jmp    1030 <lerp1@plt>

LLVM IR (-O0):
define float @lerp2(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %7
%14 = load float, float* %8
%15 = load float, float* %12
%16 = call float @lerp1(float %13, float %14, float %15)
%17 = load float, float* %9
%18 = load float, float* %10
%19 = load float, float* %12
%20 = call float @lerp1(float %17, float %18, float %19)
%21 = load float, float* %11
%22 = call float @lerp1(float %16, float %20, float %21)
ret float %22
}

LLVM IR (-O2):
define float @lerp2(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call float @lerp1(float %0, float %1, float %5)
%8 = tail call float @lerp1(float %2, float %3, float %5)
%9 = tail call float @lerp1(float %7, float %8, float %4)
ret float %9
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_srl_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test62(__m64 a, __m64 b) { return _mm_srl_pi16(a, b); }


x86 assembly (clang, -O0):
<test62>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_srl_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test62>:
jmp    1030 <_mm_srl_pi16@plt>

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

LLVM IR (-O2):
define i32 @test62(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_srl_pi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(int i) { printf("print(%d)\n", i); }


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"print(%d)\0A\00"
define void @print(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;

/* Variables and functions */
uint8_t direct_set8(volatile uint8_t *addr, uint8_t dat) {
  *addr |= dat;
  return dat;
}


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

x86 assembly (clang, -O2):
<direct_set8>:
mov    %esi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
or     %eax,(%rdi)
mov    -0x4(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @direct_set8(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store volatile i32 %1, i32* %4
%5 = load volatile i32, i32* %4
%6 = load i32*, i32** %3
%7 = load volatile i32, i32* %6
%8 = or i32 %7, %5
store volatile i32 %8, i32* %6
%9 = load volatile i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @direct_set8(i32* %0, i32 %1) {
%3 = alloca i32
store volatile i32 %1, i32* %3
%4 = load volatile i32, i32* %3
%5 = load volatile i32, i32* %0
%6 = or i32 %5, %4
store volatile i32 %6, i32* %0
%7 = load volatile i32, i32* %3
ret i32 %7
}
void unix_filename(char *p) {
  while (*p) {
    if (*p == '/')
      *p = '_';
    p++;
  }
}


x86 assembly (clang, -O0):
<unix_filename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113d <unix_filename+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    112c <unix_filename+0x2c>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <unix_filename+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unix_filename>:
jmp    1117 <unix_filename+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x5f,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x2f,%al
je     1110 <unix_filename+0x10>
test   %al,%al
jne    1113 <unix_filename+0x13>
ret

LLVM IR (-O0):
define void @unix_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %14, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 47
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = load i8*, i8** %2
store i8 95, i8* %13
br label %14
14: ; preds = %12, %7
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %2
br label %3
17: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @unix_filename(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 47, label %5
]
5: ; preds = %2
store i8 95, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int do_pk8pkey(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int, int,
               int /*<<< orphan*/ *, char *, int, int /*<<< orphan*/ *, void *);
int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, char *kstr,
                                int klen, pem_password_cb *cb, void *u) {
  return do_pk8pkey(bp, x, 1, nid, NULL, kstr, klen, cb, u);
}


x86 assembly (clang, -O0):
<i2d_PKCS8PrivateKey_nid_bio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r9
mov    -0x24(%rbp),%r11d
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    $0x1,%edx
xor    %r8d,%r8d
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <do_pk8pkey@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_PKCS8PrivateKey_nid_bio>:
push   %rax
mov    %r9,%rax
mov    %r8d,%r10d
mov    %rcx,%r9
mov    %edx,%ecx
sub    $0x8,%rsp
mov    $0x1,%edx
xor    %r8d,%r8d
push   0x18(%rsp)
push   %rax
push   %r10
call   1030 <do_pk8pkey@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @i2d_PKCS8PrivateKey_nid_bio(i32* %0, i32* %1, i32 %2, i8* %3, i32 %4, i32* %5, i8* %6) {
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i8*
store i32* %0, i32** %8
store i32* %1, i32** %9
store i32 %2, i32* %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i32* %5, i32** %13
store i8* %6, i8** %14
%15 = load i32*, i32** %8
%16 = load i32*, i32** %9
%17 = load i32, i32* %10
%18 = load i8*, i8** %11
%19 = load i32, i32* %12
%20 = load i32*, i32** %13
%21 = load i8*, i8** %14
%22 = call i32 @do_pk8pkey(i32* %15, i32* %16, i32 1, i32 %17, i32* null, i8* %18, i32 %19, i32* %20, i8* %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @i2d_PKCS8PrivateKey_nid_bio(i32* %0, i32* %1, i32 %2, i8* %3, i32 %4, i32* %5, i8* %6) {
%8 = tail call i32 @do_pk8pkey(i32* %0, i32* %1, i32 1, i32 %2, i32* null, i8* %3, i32 %4, i32* %5, i8* %6)
ret i32 %8
}
void handle_sigint(int signum) {
  printf("Enter %s: the signum = %d\n", __func__, signum);
  exit(0);
}


x86 assembly (clang, -O0):
<handle_sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xecb(%rip),%rdi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_sigint>:
push   %rax
mov    %edi,%edx
lea    0xed6(%rip),%rdi
lea    0xeea(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Enter %s: the signum = %d\0A\00"
@__func__.handle_sigint = [14 x i8] c"handle_sigint\00"
define void @handle_sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.handle_sigint, i64 0, i64 0), i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter %s: the signum = %d\0A\00"
@__func__.handle_sigint = [14 x i8] c"handle_sigint\00"
define void @handle_sigint(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.handle_sigint, i64 0, i64 0), i32 %0)
tail call void @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ config_status(int, char *);
int /*<<< orphan*/ stop_route();
void second_session_down(void) {
  stop_route();
  config_status(1, "0");
}


x86 assembly (clang, -O0):
<second_session_down>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <stop_route@plt>
mov    $0x1,%edi
lea    0xec9(%rip),%rsi
call   1030 <config_status@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<second_session_down>:
push   %rax
xor    %eax,%eax
call   1040 <stop_route@plt>
lea    0xed1(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1030 <config_status@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
define void @second_session_down() {
%1 = call i32 (...) @stop_route()
%2 = call i32 @config_status(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define void @second_session_down() {
%1 = tail call i32 (...) @stop_route()
%2 = tail call i32 @config_status(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void tokenize(char *s, size_t l) {
  putchar('{');
  while (l--)
    putchar(*s++);
  putchar('}');
  putchar('\n');
}


x86 assembly (clang, -O0):
<tokenize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x7b,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     115f <tokenize+0x4f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    112a <tokenize+0x1a>
mov    $0x7d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tokenize>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    $0x7b,%edi
call   1030 <putchar@plt>
test   %r15,%r15
je     1143 <tokenize+0x33>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <tokenize+0x20>
mov    $0x7d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @tokenize(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = call i32 @putchar(i8 signext 123)
br label %6
6: ; preds = %10, %2
%7 = load i64, i64* %4
%8 = add i64 %7, -1
store i64 %8, i64* %4
%9 = icmp ne i64 %7, 0
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
%13 = load i8, i8* %11
%14 = call i32 @putchar(i8 signext %13)
br label %6
15: ; preds = %6
%16 = call i32 @putchar(i8 signext 125)
%17 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @tokenize(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @putchar(i8 signext 123)
%4 = icmp eq i64 %1, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ %1, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = add i64 %6, -1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = tail call i32 @putchar(i8 signext %10)
%12 = icmp eq i64 %8, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = tail call i32 @putchar(i8 signext 125)
%15 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex8(int, unsigned char);
void print_debug_hex8(unsigned char value) { __console_tx_hex8(7, value); }


x86 assembly (clang, -O0):
<print_debug_hex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x7,%edi
movzbl -0x1(%rbp),%esi
call   1030 <__console_tx_hex8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_debug_hex8>:
mov    %edi,%esi
mov    $0x7,%edi
jmp    1030 <__console_tx_hex8@plt>

LLVM IR (-O0):
define void @print_debug_hex8(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @__console_tx_hex8(i32 7, i8 zeroext %3)
ret void
}

LLVM IR (-O2):
define void @print_debug_hex8(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_hex8(i32 7, i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void app_usage_1(void) {
  puts("Usage 1");
  puts("For listing available framebuffer devices type ");
  puts("\"fbtest -list\"");
  puts("Then choose framebuffer device.");
  puts("");
}


x86 assembly (clang, -O0):
<app_usage_1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<app_usage_1>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xed4(%rip),%rdi
call   1040 <puts@plt>
lea    0xef8(%rip),%rdi
call   1040 <puts@plt>
lea    0xefb(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage 1\00"
@.str.1 = [48 x i8] c"For listing available framebuffer devices type \00"
@.str.2 = [15 x i8] c"\22fbtest -list\22\00"
@.str.3 = [32 x i8] c"Then choose framebuffer device.\00"
@.str.4 = [1 x i8] zeroinitializer
define void @app_usage_1() {
%1 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Usage 1\00"
@.str.1 = [48 x i8] c"For listing available framebuffer devices type \00"
@.str.2 = [15 x i8] c"\22fbtest -list\22\00"
@.str.3 = [32 x i8] c"Then choose framebuffer device.\00"
define void @app_usage_1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret void
}
int gcd(int m, int n) {
  if (n % m == 0) {
    return m;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1125 <gcd+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112c <gcd+0x2c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%eax
cltd
idiv   %edi
test   %edx,%edx
mov    $0x1,%eax
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = srem i32 %1, %0
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 %0, i32 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ UART_OutChar(int);
void OutCRLF(void) {
  UART_OutChar(0x0D);
  UART_OutChar(0x0A);
}


x86 assembly (clang, -O0):
<OutCRLF>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd,%edi
call   1030 <UART_OutChar@plt>
mov    $0xa,%edi
call   1030 <UART_OutChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OutCRLF>:
push   %rax
mov    $0xd,%edi
call   1030 <UART_OutChar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <UART_OutChar@plt>

LLVM IR (-O0):
define void @OutCRLF() {
%1 = call i32 @UART_OutChar(i32 13)
%2 = call i32 @UART_OutChar(i32 10)
ret void
}

LLVM IR (-O2):
define void @OutCRLF() {
%1 = tail call i32 @UART_OutChar(i32 13)
%2 = tail call i32 @UART_OutChar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2c_write(int, int, int);
void mpu6050_init(void) {
  i2c_write(0xd0, 0x6B, 0x00);
  i2c_write(0xd0, 0x19, 0x00);
  i2c_write(0xd0, 0x1A, 0x03);
  i2c_write(0xd0, 0x24, 0x0D);
  i2c_write(0xd0, 0x6A, 0xC8);
  i2c_write(0xd0, 0x37, 0x32);
  i2c_write(0xd0, 0x1C, 0x08);
  i2c_write(0xd0, 0x1B, 0x08);
}


x86 assembly (clang, -O0):
<mpu6050_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd0,%edi
mov    $0x6b,%esi
xor    %edx,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x19,%esi
xor    %edx,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x1a,%esi
mov    $0x3,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x24,%esi
mov    $0xd,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x6a,%esi
mov    $0xc8,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x37,%esi
mov    $0x32,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x1c,%esi
mov    $0x8,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x1b,%esi
mov    $0x8,%edx
call   1030 <i2c_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpu6050_init>:
push   %rax
mov    $0xd0,%edi
mov    $0x6b,%esi
xor    %edx,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x19,%esi
xor    %edx,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x1a,%esi
mov    $0x3,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x24,%esi
mov    $0xd,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x6a,%esi
mov    $0xc8,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x37,%esi
mov    $0x32,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x1c,%esi
mov    $0x8,%edx
call   1030 <i2c_write@plt>
mov    $0xd0,%edi
mov    $0x1b,%esi
mov    $0x8,%edx
pop    %rax
jmp    1030 <i2c_write@plt>

LLVM IR (-O0):
define void @mpu6050_init() {
%1 = call i32 @i2c_write(i32 208, i32 107, i32 0)
%2 = call i32 @i2c_write(i32 208, i32 25, i32 0)
%3 = call i32 @i2c_write(i32 208, i32 26, i32 3)
%4 = call i32 @i2c_write(i32 208, i32 36, i32 13)
%5 = call i32 @i2c_write(i32 208, i32 106, i32 200)
%6 = call i32 @i2c_write(i32 208, i32 55, i32 50)
%7 = call i32 @i2c_write(i32 208, i32 28, i32 8)
%8 = call i32 @i2c_write(i32 208, i32 27, i32 8)
ret void
}

LLVM IR (-O2):
define void @mpu6050_init() {
%1 = tail call i32 @i2c_write(i32 208, i32 107, i32 0)
%2 = tail call i32 @i2c_write(i32 208, i32 25, i32 0)
%3 = tail call i32 @i2c_write(i32 208, i32 26, i32 3)
%4 = tail call i32 @i2c_write(i32 208, i32 36, i32 13)
%5 = tail call i32 @i2c_write(i32 208, i32 106, i32 200)
%6 = tail call i32 @i2c_write(i32 208, i32 55, i32 50)
%7 = tail call i32 @i2c_write(i32 208, i32 28, i32 8)
%8 = tail call i32 @i2c_write(i32 208, i32 27, i32 8)
ret void
}
void SteamAPI_ISteamGameServer_LogOff(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamGameServer_LogOff>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamGameServer_LogOff = [33 x i8] c"SteamAPI_ISteamGameServer_LogOff\00"
define void @SteamAPI_ISteamGameServer_LogOff(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__func__.SteamAPI_ISteamGameServer_LogOff, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamGameServer_LogOff = [33 x i8] c"SteamAPI_ISteamGameServer_LogOff\00"
define void @SteamAPI_ISteamGameServer_LogOff(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__func__.SteamAPI_ISteamGameServer_LogOff, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *cmd) {
  printf("%s <host> [filespec] [-l <username>] [-p <password]\n", cmd);
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"%s <host> [filespec] [-l <username>] [-p <password]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [53 x i8] c"%s <host> [filespec] [-l <username>] [-p <password]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int mt_genrand64_int64();
double mt_genrand64_real3(void) {
  return ((mt_genrand64_int64() >> 12) + 0.5) * (1.0 / 4503599627370496.0);
}


x86 assembly (clang, -O0):
<mt_genrand64_real3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mt_genrand64_int64@plt>
sar    $0xc,%eax
cvtsi2sd %eax,%xmm0
movsd  0xede(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_genrand64_real3>:
push   %rax
xor    %eax,%eax
call   1030 <mt_genrand64_int64@plt>
sar    $0xc,%eax
cvtsi2sd %eax,%xmm0
addsd  0xed9(%rip),%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mt_genrand64_real3() {
%1 = call i32 (...) @mt_genrand64_int64()
%2 = ashr i32 %1, 12
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fmul double %4, 0x3CB0000000000000
ret double %5
}

LLVM IR (-O2):
define double @mt_genrand64_real3() {
%1 = tail call i32 (...) @mt_genrand64_int64()
%2 = ashr i32 %1, 12
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fmul double %4, 0x3CB0000000000000
ret double %5
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double ceill(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<ceill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @ceill(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @ceill(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Variables and functions */
void *malloc(size_t);
void *mm_malloc(void *ctx, size_t n) {
  (void)(ctx);
  return malloc(n);
}


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

x86 assembly (clang, -O2):
<mm_malloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @mm_malloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void tiger_flush() {
  fflush(stdout);
  return;
}


x86 assembly (clang, -O0):
<tiger_flush>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tiger_flush>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @tiger_flush() {
%1 = load i32, i32* @stdout
%2 = call i32 @fflush(i32 %1)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @tiger_flush() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
ret void
}
void I422ToARGB4444Row_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToARGB4444Row_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int recv(int, char *, int, int /*<<< orphan*/);
int recvRaw(int raw_fd, char *recv_packet, int len) {
  memset(recv_packet, 0, len);
  return recv(raw_fd, recv_packet, len, 0);
}


x86 assembly (clang, -O0):
<recvRaw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recvRaw>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <recv@plt>

LLVM IR (-O0):
define i32 @recvRaw(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 i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @memset(i8* %7, i32 0, i32 %8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @recv(i32 %10, i8* %11, i32 %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @recvRaw(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @memset(i8* %1, i32 0, i32 %2)
%5 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ILibStun_DelaySendIceRequest_OnLifeTimeDestroy(void *object) {
  free(object);
}


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

x86 assembly (clang, -O2):
<ILibStun_DelaySendIceRequest_OnLifeTimeDestroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @ILibStun_DelaySendIceRequest_OnLifeTimeDestroy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @ILibStun_DelaySendIceRequest_OnLifeTimeDestroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ create_uuid(char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char uuid[100];
  char *timestamp = "1111111", *ip = "127.0.0.1";
  create_uuid(uuid, timestamp, ip);
  printf("%s", uuid);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    0xec4(%rip),%rax
mov    %rax,-0x80(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x80(%rbp),%rdx
call   1040 <create_uuid@plt>
lea    -0x70(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xed4(%rip),%rsi
lea    0xed5(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <create_uuid@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"1111111\00"
@.str.1 = [10 x i8] c"127.0.0.1\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @create_uuid(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
char *foo();
int /*<<< orphan*/ strcat(char *, char *);
int main(int argc, char *argv[]) {
  char *str = foo();
  strcat(str, "!");
  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)
mov    $0x0,%al
call   1030 <foo@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1040 <strcat@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <foo@plt>
lea    0xed1(%rip),%rsi
mov    %rax,%rdi
call   1040 <strcat@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @foo()
%4 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct XorrisO {
  int dummy;
};

/* Variables and functions */
int Xorriso_relax_compliance(struct XorrisO *, char *, int /*<<< orphan*/);
int Xorriso_option_compliance(struct XorrisO *xorriso, char *mode, int flag) {
  return (Xorriso_relax_compliance(xorriso, mode, 0));
}


x86 assembly (clang, -O0):
<Xorriso_option_compliance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <Xorriso_relax_compliance@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xorriso_option_compliance>:
xor    %edx,%edx
jmp    1030 <Xorriso_relax_compliance@plt>

LLVM IR (-O0):
%struct.XorrisO = type { i32 }
define i32 @Xorriso_option_compliance(%struct.XorrisO* %0, i8* %1, i32 %2) {
%4 = alloca %struct.XorrisO*
%5 = alloca i8*
%6 = alloca i32
store %struct.XorrisO* %0, %struct.XorrisO** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.XorrisO*, %struct.XorrisO** %4
%8 = load i8*, i8** %5
%9 = call i32 @Xorriso_relax_compliance(%struct.XorrisO* %7, i8* %8, i32 0)
ret i32 %9
}

LLVM IR (-O2):
%struct.XorrisO = type { i32 }
define i32 @Xorriso_option_compliance(%struct.XorrisO* %0, i8* %1, i32 %2) {
%4 = tail call i32 @Xorriso_relax_compliance(%struct.XorrisO* %0, i8* %1, i32 0)
ret i32 %4
}
/* Type definitions */
struct subnet_file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprint_subnet_file(int /*<<< orphan*/,
                                      struct subnet_file const *, int);
int /*<<< orphan*/ stdout;
void print_subnet_file(const struct subnet_file *sf, int compress_level) {
  fprint_subnet_file(stdout, sf, compress_level);
}


x86 assembly (clang, -O0):
<print_subnet_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <fprint_subnet_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_subnet_file>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprint_subnet_file@plt>

LLVM IR (-O0):
%struct.subnet_file = type { i32 }
@stdout = global i32 0
define void @print_subnet_file(%struct.subnet_file* %0, i32 %1) {
%3 = alloca %struct.subnet_file*
%4 = alloca i32
store %struct.subnet_file* %0, %struct.subnet_file** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load %struct.subnet_file*, %struct.subnet_file** %3
%7 = load i32, i32* %4
%8 = call i32 @fprint_subnet_file(i32 %5, %struct.subnet_file* %6, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.subnet_file = type { i32 }
@stdout = global i32 0
define void @print_subnet_file(%struct.subnet_file* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprint_subnet_file(i32 %3, %struct.subnet_file* %0, i32 %1)
ret void
}
long blog(long x) {
  long l = 0;
  while (x) {
    x >>= 1;
    l++;
  }
  return l;
}


x86 assembly (clang, -O0):
<blog>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <blog+0x38>
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <blog+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blog>:
xor    %eax,%eax
test   %rdi,%rdi
je     1120 <blog+0x20>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
sar    %rcx
add    $0x1,%rax
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <blog+0x10>
ret

LLVM IR (-O0):
define i64 @blog(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i64, i64* %2
%9 = ashr i64 %8, 1
store i64 %9, i64* %2
%10 = load i64, i64* %3
%11 = add nsw i64 %10, 1
store i64 %11, i64* %3
br label %4
12: ; preds = %4
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
define i64 @blog(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i64 %5, 1
%7 = add nuw nsw i64 %4, 1
%8 = icmp ult i64 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %10
}
void chal2chalStart_inchal_chalEnd() {}


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

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

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

LLVM IR (-O2):
define void @chal2chalStart_inchal_chalEnd() {
ret void
}
/* Variables and functions */
int bah(int, int);
int /*<<< orphan*/ do_other_stuff();
int /*<<< orphan*/ do_stuff(int);
int top2(int q) {
  do_stuff(200);
  do_other_stuff();
  return bah(16, q);
}


x86 assembly (clang, -O0):
<top2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xc8,%edi
call   1050 <do_stuff@plt>
mov    $0x0,%al
call   1030 <do_other_stuff@plt>
mov    -0x4(%rbp),%esi
mov    $0x10,%edi
call   1040 <bah@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<top2>:
push   %rbx
mov    %edi,%ebx
mov    $0xc8,%edi
call   1050 <do_stuff@plt>
xor    %eax,%eax
call   1030 <do_other_stuff@plt>
mov    $0x10,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <bah@plt>

LLVM IR (-O0):
define i32 @top2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @do_stuff(i32 200)
%4 = call i32 (...) @do_other_stuff()
%5 = load i32, i32* %2
%6 = call i32 @bah(i32 16, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @top2(i32 %0) {
%2 = tail call i32 @do_stuff(i32 200)
%3 = tail call i32 (...) @do_other_stuff()
%4 = tail call i32 @bah(i32 16, i32 %0)
ret i32 %4
}
/* Variables and functions */
int if_nametoindex(char const *);
int get_if_index(int fd, const char *device) { return if_nametoindex(device); }


x86 assembly (clang, -O0):
<get_if_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <if_nametoindex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_if_index>:
mov    %rsi,%rdi
jmp    1030 <if_nametoindex@plt>

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

LLVM IR (-O2):
define i32 @get_if_index(i32 %0, i8* %1) {
%3 = tail call i32 @if_nametoindex(i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ delete_variables();
int /*<<< orphan*/ get_input();
int /*<<< orphan*/ print_prompt();
int /*<<< orphan*/ print_welcome();
int /*<<< orphan*/ printf(char *);
int main(void) {
  print_welcome();
  while (1) {
    print_prompt();
    if (!get_input())
      break;
  }
  delete_variables();
  printf("Normal termination.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <print_welcome@plt>
mov    $0x0,%al
call   1030 <print_prompt@plt>
mov    $0x0,%al
call   1070 <get_input@plt>
cmp    $0x0,%eax
jne    1182 <main+0x32>
jmp    1187 <main+0x37>
jmp    1166 <main+0x16>
mov    $0x0,%al
call   1060 <delete_variables@plt>
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <print_welcome@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <print_prompt@plt>
xor    %eax,%eax
call   1070 <get_input@plt>
test   %eax,%eax
jne    1160 <main+0x10>
xor    %eax,%eax
call   1060 <delete_variables@plt>
lea    0xe80(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Normal termination.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @print_welcome()
br label %3
3: ; preds = %0, %8
%4 = call i32 (...) @print_prompt()
%5 = call i32 (...) @get_input()
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %3
br label %9
8: ; preds = %3
br label %3
9: ; preds = %7
%10 = call i32 (...) @delete_variables()
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"Normal termination.\00"
define i32 @main() {
%1 = tail call i32 (...) @print_welcome()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @print_prompt()
%4 = tail call i32 (...) @get_input()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 (...) @delete_variables()
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int mus_bytes_per_sample(int);
off_t mus_samples_to_bytes(int format, off_t size) {
  return (size * (mus_bytes_per_sample(format)));
}


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

x86 assembly (clang, -O2):
<mus_samples_to_bytes>:
push   %rbx
mov    %esi,%ebx
call   1030 <mus_bytes_per_sample@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mus_samples_to_bytes(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
%7 = call i32 @mus_bytes_per_sample(i32 %6)
%8 = mul nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @mus_samples_to_bytes(i32 %0, i32 %1) {
%3 = tail call i32 @mus_bytes_per_sample(i32 %0)
%4 = mul nsw i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void neverrun(void) { printf("H4x0r!!!!!!!!!!!!!11"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"H4x0r!!!!!!!!!!!!!11\00"
define void @neverrun() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"H4x0r!!!!!!!!!!!!!11\00"
define void @neverrun() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wNotYet(char *);
void wBuiltinRmDir() { wNotYet("RmDir"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"RmDir\00"
define void @wBuiltinRmDir() {
%1 = call i32 @wNotYet(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"RmDir\00"
define void @wBuiltinRmDir() {
%1 = tail call i32 @wNotYet(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void std_close(int fd) {
  if (close(fd) == -1) {
    perror("close");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1162 <std_close+0x32>
lea    0xead(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_close>:
push   %rax
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     113d <std_close+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"close\00"
define void @std_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"close\00"
define void @std_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}