xunge/DecIR huggingface dataset:
float kmDegreesToRadians(float degrees) { return degrees * 0.017453f; }


x86 assembly (clang, -O0):
<kmDegreesToRadians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmDegreesToRadians>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @kmDegreesToRadians(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3F91DF3300000000
ret float %4
}

LLVM IR (-O2):
define float @kmDegreesToRadians(float %0) {
%2 = fmul float %0, 0x3F91DF3300000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *);
int /*<<< orphan*/ stderr;
void die_with_error(const char *message) {
  fprintf(stderr, "%s%s\n", "disl-agent: error: ", message);
  exit(10000);
}


x86 assembly (clang, -O0):
<die_with_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rcx
lea    0xec0(%rip),%rsi
lea    0xebf(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x2710,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die_with_error>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xecb(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x2710,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%s%s\0A\00"
@.str.1 = [20 x i8] c"disl-agent: error: \00"
define void @die_with_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 10000)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%s%s\0A\00"
@.str.1 = [20 x i8] c"disl-agent: error: \00"
define void @die_with_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 10000)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void set_ltree_addr(uint32_t addr[8], uint32_t ltree) { addr[4] = ltree; }


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

x86 assembly (clang, -O2):
<set_ltree_addr>:
mov    %esi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @set_ltree_addr(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 = getelementptr inbounds i32, i32* %6, i64 4
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @set_ltree_addr(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %1, i32* %3
ret void
}
unsigned int LLIntegerLog2M(unsigned int v) {
  unsigned int i = 0;
  while (v > 1) {
    ++i;
    v >>= 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<LLIntegerLog2M>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jbe    112f <LLIntegerLog2M+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <LLIntegerLog2M+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LLIntegerLog2M>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <LLIntegerLog2M+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    %ecx
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <LLIntegerLog2M+0x10>
ret

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

LLVM IR (-O2):
define i32 @LLIntegerLog2M(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ apm_out_str_asm(int /*<<< orphan*/, char const *);
void apm_out_str(const char *s, uint16_t port) {
  if (*s)
    apm_out_str_asm(port, s);
}


x86 assembly (clang, -O0):
<apm_out_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1138 <apm_out_str+0x28>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <apm_out_str_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apm_out_str>:
cmpb   $0x0,(%rdi)
je     1122 <apm_out_str+0x12>
mov    %rdi,%rax
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <apm_out_str_asm@plt>
ret

LLVM IR (-O0):
define void @apm_out_str(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 i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i8*, i8** %3
%11 = call i32 @apm_out_str_asm(i32 %9, i8* %10)
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @apm_out_str(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @apm_out_str_asm(i32 %1, i8* %0)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int recv(int, char *, int, int /*<<< orphan*/);
int receive_request(int client_fd, char *request) {
  return recv(client_fd, request, 10000, 0);
}


x86 assembly (clang, -O0):
<receive_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x2710,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<receive_request>:
mov    $0x2710,%edx
xor    %ecx,%ecx
jmp    1030 <recv@plt>

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

LLVM IR (-O2):
define i32 @receive_request(i32 %0, i8* %1) {
%3 = tail call i32 @recv(i32 %0, i8* %1, i32 10000, i32 0)
ret i32 %3
}
/* Variables and functions */
int _doio(int, void *, int, int /*<<< orphan*/);
int write(int fd, const void *buf, int count) {
  return _doio(fd, (void *)buf, count, 0);
}


x86 assembly (clang, -O0):
<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
xor    %ecx,%ecx
call   1030 <_doio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
xor    %ecx,%ecx
jmp    1030 <_doio@plt>

LLVM IR (-O0):
define i32 @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 @_doio(i32 %7, i8* %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @_doio(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ erasewchar(int /*<<< orphan*/ *);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_int(int /*<<< orphan*/);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_erasewchar(int nargs, char **args) {
  wchar_t ch;
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(2);
  report_return(erasewchar(&ch));
  report_int(ch);
}


x86 assembly (clang, -O0):
<cmd_erasewchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1177 <cmd_erasewchar+0x27>
jmp    1199 <cmd_erasewchar+0x49>
mov    $0x2,%edi
call   1050 <report_count@plt>
lea    -0x14(%rbp),%rdi
call   1060 <erasewchar@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
mov    -0x14(%rbp),%edi
call   1070 <report_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_erasewchar>:
push   %rax
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
je     1181 <cmd_erasewchar+0x31>
mov    $0x2,%edi
call   1050 <report_count@plt>
lea    0x4(%rsp),%rdi
call   1060 <erasewchar@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
mov    0x4(%rsp),%edi
call   1070 <report_int@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @cmd_erasewchar(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = call i32 @check_arg_count(i32 %6, i32 0)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %2
br label %16
10: ; preds = %2
%11 = call i32 @report_count(i32 2)
%12 = call i32 @erasewchar(i32* %5)
%13 = call i32 @report_return(i32 %12)
%14 = load i32, i32* %5
%15 = call i32 @report_int(i32 %14)
br label %16
16: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @cmd_erasewchar(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @check_arg_count(i32 %0, i32 0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = tail call i32 @report_count(i32 2)
%9 = call i32 @erasewchar(i32* %3)
%10 = call i32 @report_return(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 @report_int(i32 %11)
br label %13
13: ; preds = %2, %7
ret void
}
void crypto_random_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @crypto_random_deinit() {
ret void
}
void dlntest_ordinal(void) {}


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

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

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

LLVM IR (-O2):
define void @dlntest_ordinal() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_shuffle_epi32(int /*<<< orphan*/ const, int);
int /*<<< orphan*/ _mm_shufflehi_epi16(int /*<<< orphan*/ const, int);
int /*<<< orphan*/ _mm_shufflelo_epi16(int /*<<< orphan*/ const, int);
__m128i mm_reverse_epi16(const __m128i x) {
  const __m128i a = _mm_shufflelo_epi16(x, 0x1b);
  const __m128i b = _mm_shufflehi_epi16(a, 0x1b);
  return _mm_shuffle_epi32(b, 0x4e);
}


x86 assembly (clang, -O0):
<mm_reverse_epi16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1b,%esi
call   1030 <_mm_shufflelo_epi16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1b,%esi
call   1050 <_mm_shufflehi_epi16@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x4e,%esi
call   1040 <_mm_shuffle_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_reverse_epi16>:
push   %rax
mov    $0x1b,%esi
call   1030 <_mm_shufflelo_epi16@plt>
mov    %eax,%edi
mov    $0x1b,%esi
call   1050 <_mm_shufflehi_epi16@plt>
mov    %eax,%edi
mov    $0x4e,%esi
pop    %rax
jmp    1040 <_mm_shuffle_epi32@plt>

LLVM IR (-O0):
define i32 @mm_reverse_epi16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @_mm_shufflelo_epi16(i32 %5, i32 27)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @_mm_shufflehi_epi16(i32 %7, i32 27)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @_mm_shuffle_epi32(i32 %9, i32 78)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mm_reverse_epi16(i32 %0) {
%2 = tail call i32 @_mm_shufflelo_epi16(i32 %0, i32 27)
%3 = tail call i32 @_mm_shufflehi_epi16(i32 %2, i32 27)
%4 = tail call i32 @_mm_shuffle_epi32(i32 %3, i32 78)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ funcL(unsigned char *, unsigned char *);
int /*<<< orphan*/ funcS(unsigned char *, unsigned char *);
int /*<<< orphan*/ funcX(unsigned char *, unsigned char *, unsigned char *);
void funcLSX(unsigned char *a, unsigned char *b, unsigned char *outdata) {
  unsigned char temp1[16] = {0};
  unsigned char temp2[16] = {0};
  funcX(a, b, temp1);
  funcS(temp1, temp2);
  funcL(temp2, outdata);
}


x86 assembly (clang, -O0):
<funcLSX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1060 <funcX@plt>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <funcS@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <funcL@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcLSX>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%r15
mov    %r15,%rdx
call   1050 <funcX@plt>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <funcS@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <funcL@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @funcLSX(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [16 x i8]
%8 = alloca [16 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = bitcast [16 x i8]* %7 to i8*
%10 = bitcast [16 x i8]* %8 to i8*
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%14 = call i32 @funcX(i8* %11, i8* %12, i8* %13)
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%17 = call i32 @funcS(i8* %15, i8* %16)
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%19 = load i8*, i8** %6
%20 = call i32 @funcL(i8* %18, i8* %19)
ret void
}

LLVM IR (-O2):
define void @funcLSX(i8* %0, i8* %1, i8* %2) {
%4 = alloca [16 x i8]
%5 = alloca [16 x i8]
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%8 = call i32 @funcX(i8* %0, i8* %1, i8* %6)
%9 = call i32 @funcS(i8* %6, i8* %7)
%10 = call i32 @funcL(i8* %7, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_reverse(char *);
int /*<<< orphan*/ read_line(char *, int);
int main(int argc, char **argv) {
  char linetext[80];
  read_line(linetext, 80);
  print_reverse(linetext);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x50,%esi
call   1030 <read_line@plt>
lea    -0x60(%rbp),%rdi
call   1040 <print_reverse@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1030 <read_line@plt>
mov    %rbx,%rdi
call   1040 <print_reverse@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [80 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%8 = call i32 @read_line(i8* %7, i32 80)
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%10 = call i32 @print_reverse(i8* %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 @read_line(i8* %4, i32 80)
%6 = call i32 @print_reverse(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_write_21(unsigned int data) {
  unsigned int bank_offset = 0x0C40;
  unsigned int bit_index = 5;
  exynos_5410_gpio_write_mask(bank_offset, ((data & 1U) << bit_index),
                              (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_write_21>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xc40,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
and    $0x1,%esi
mov    -0xc(%rbp),%ecx
shl    %cl,%esi
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_write_21>:
mov    %edi,%esi
shl    $0x5,%esi
and    $0x20,%esi
mov    $0xc40,%edi
mov    $0x20,%edx
jmp    1030 <exynos_5410_gpio_write_mask@plt>

LLVM IR (-O0):
define void @odroid_xu_gpio_write_21(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 3136, i32* %3
store i32 5, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = and i32 %6, 1
%8 = load i32, i32* %4
%9 = shl i32 %7, %8
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = call i32 @exynos_5410_gpio_write_mask(i32 %5, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_write_21(i32 %0) {
%2 = shl i32 %0, 5
%3 = and i32 %2, 32
%4 = tail call i32 @exynos_5410_gpio_write_mask(i32 3136, i32 %3, i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAtmRfa1TimerMacP__CompareB__reset();
void AtmegaCompareP__1__AtmegaCompare__reset(void) {
  HplAtmRfa1TimerMacP__CompareB__reset();
}


x86 assembly (clang, -O0):
<AtmegaCompareP__1__AtmegaCompare__reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplAtmRfa1TimerMacP__CompareB__reset@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @AtmegaCompareP__1__AtmegaCompare__reset() {
%1 = call i32 (...) @HplAtmRfa1TimerMacP__CompareB__reset()
ret void
}

LLVM IR (-O2):
define void @AtmegaCompareP__1__AtmegaCompare__reset() {
%1 = tail call i32 (...) @HplAtmRfa1TimerMacP__CompareB__reset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ butler();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("I will summon the butler function.\n");
  butler();
  printf("Yes. Bring me some tea and writeable DVDs.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <butler@plt>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <butler@plt>
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"I will summon the butler function.\0A\00"
@.str.1 = [44 x i8] c"Yes. Bring me some tea and writeable DVDs.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @butler()
%4 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"I will summon the butler function.\00"
@str.2 = [43 x i8] c"Yes. Bring me some tea and writeable DVDs.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @butler()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
long oc_storage_write(const char *store, uint8_t *buf, size_t size) {
  return -1;
}


x86 assembly (clang, -O0):
<oc_storage_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oc_storage_write>:
mov    $0xffffffffffffffff,%rax
ret

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

LLVM IR (-O2):
define i64 @oc_storage_write(i8* nocapture readnone %0, i32* nocapture readnone %1, i64 %2) {
ret i64 -1
}
/* Type definitions */
struct stat {
  int dummy;
};
struct FTW {
  int dummy;
};

/* Variables and functions */
int FTW_F;
int /*<<< orphan*/ insert(char const *, struct stat const *);
int visit(const char *name, const struct stat *st, int flag, struct FTW *ftw) {
  if (flag == FTW_F)
    insert(name, st);
  return 0;
}


x86 assembly (clang, -O0):
<visit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eb7(%rip),%rcx
cmp    (%rcx),%eax
jne    1146 <visit+0x36>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <insert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visit>:
push   %rax
mov    0x2ed0(%rip),%rax
cmp    %edx,(%rax)
jne    1121 <visit+0x11>
call   1030 <insert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
@FTW_F = global i32 0
define i32 @visit(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* %3) {
%5 = alloca i8*
%6 = alloca %struct.stat*
%7 = alloca i32
%8 = alloca %struct.FTW*
store i8* %0, i8** %5
store %struct.stat* %1, %struct.stat** %6
store i32 %2, i32* %7
store %struct.FTW* %3, %struct.FTW** %8
%9 = load i32, i32* %7
%10 = load i32, i32* @FTW_F
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %4
%13 = load i8*, i8** %5
%14 = load %struct.stat*, %struct.stat** %6
%15 = call i32 @insert(i8* %13, %struct.stat* %14)
br label %16
16: ; preds = %12, %4
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.FTW = type { i32 }
@FTW_F = global i32 0
define i32 @visit(i8* %0, %struct.stat* %1, i32 %2, %struct.FTW* nocapture readnone %3) {
%5 = load i32, i32* @FTW_F
%6 = icmp eq i32 %5, %2
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @insert(i8* %0, %struct.stat* %1)
br label %9
9: ; preds = %7, %4
ret i32 0
}
int suma(int a) {
  if (a == 0) {
    return 0;
  } else {
    return a + suma(a - 1);
  }
}


x86 assembly (clang, -O0):
<suma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <suma+0x21>
movl   $0x0,-0x4(%rbp)
jmp    114c <suma+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <suma@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suma>:
test   %edi,%edi
je     1119 <suma+0x19>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @suma(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 0, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = call i32 @suma(i32 %10)
%12 = add nsw i32 %8, %11
store i32 %12, i32* %2
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @suma(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
br label %14
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %13, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 5, b = 2, c = 5;
  printf("%d", a == c ? b++ : (++c));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1153 <main+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
mov    %eax,-0x14(%rbp)
jmp    115f <main+0x4f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 2, i32* %3
store i32 5, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %14
11: ; preds = %0
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
br label %14
14: ; preds = %11, %8
%15 = phi i32 [ %9, %8 ], [ %13, %11 ]
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void RNDResponseSink_RenderingControl_SetVolume(struct UPnPService *Service,
                                                int ErrorCode, void *User) {
  printf("RND Invoke Response: RenderingControl/SetVolume[ErrorCode:%d]()\r\n",
         ErrorCode);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_SetVolume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [66 x i8] c"RND Invoke Response: RenderingControl/SetVolume[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetVolume(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [66 x i8] c"RND Invoke Response: RenderingControl/SetVolume[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetVolume(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int test41(int x) {
  int y;
  if (x)
    y = 1;
  return y;
}


x86 assembly (clang, -O0):
<test41>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1118 <test41+0x18>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test41(i32 %0) {
ret i32 1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ value_mask;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
unsigned long get_XConfigureRequestEvent_value_mask(void *_p) {
  return (unsigned long)((XConfigureRequestEvent *)_p)->value_mask;
}


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

x86 assembly (clang, -O2):
<get_XConfigureRequestEvent_value_mask>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XConfigureRequestEvent_value_mask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XConfigureRequestEvent_value_mask(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
double diva(double num1, double num2) {
  double re;
  re = num1 / num2;
  return re;
}


x86 assembly (clang, -O0):
<diva>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<diva>:
divsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @diva(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
void gennop(void) {}


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

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

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

LLVM IR (-O2):
define void @gennop() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<main>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
int dwc3_otg_suspend(struct dwc3 *dwc) { return 0; }


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

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

LLVM IR (-O0):
%struct.dwc3 = type opaque
define i32 @dwc3_otg_suspend(%struct.dwc3* %0) {
%2 = alloca %struct.dwc3*
store %struct.dwc3* %0, %struct.dwc3** %2
ret i32 0
}

LLVM IR (-O2):
%struct.dwc3 = type opaque
define i32 @dwc3_otg_suspend(%struct.dwc3* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char *);
int /*<<< orphan*/ usec_to_str(int /*<<< orphan*/, char *);
void report_probe_time(const char *prefix, uint64_t usec) {
  char str[128];
  usec_to_str(usec, str);
  printf("%s %s\n", prefix, str);
}


x86 assembly (clang, -O0):
<report_probe_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x90(%rbp),%rsi
call   1040 <usec_to_str@plt>
mov    -0x8(%rbp),%rsi
lea    -0x90(%rbp),%rdx
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_probe_time>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %esi,%edi
mov    %r14,%rsi
call   1040 <usec_to_str@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
define void @report_probe_time(i8* %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @usec_to_str(i32 %1, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret void
}
/* Variables and functions */
size_t func_count(void) { return 5; }


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

x86 assembly (clang, -O2):
<func_count>:
mov    $0x5,%eax
ret

LLVM IR (-O0):
define i64 @func_count() {
ret i64 5
}

LLVM IR (-O2):
define i64 @func_count() {
ret i64 5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  void (*callback)();
};
typedef TYPE_1__ XIMCallback;

/* Variables and functions */
void set_XIMCallback_callback(void *_p, void *_v) {
  ((XIMCallback *)_p)->callback = (void (*)())_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { void (...)* }
define void @set_XIMCallback_callback(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to void (...)*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store void (...)* %6, void (...)** %9
ret void
}

LLVM IR (-O2):
define void @set_XIMCallback_callback(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
float _Complex fun_float_complex(void) { return 1.5 + 2.5i; }


x86 assembly (clang, -O0):
<fun_float_complex>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3fc00000,-0x8(%rbp)
movl   $0x40200000,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_float_complex>:
movaps 0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define <2 x float> @fun_float_complex() {
%1 = alloca { float, float }
%2 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 0
%3 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 1
store float 1.500000e+00, float* %2
store float 2.500000e+00, float* %3
%4 = bitcast { float, float }* %1 to <2 x float>*
%5 = load <2 x float>, <2 x float>* %4
ret <2 x float> %5
}

LLVM IR (-O2):
define <2 x float> @fun_float_complex() {
ret <2 x float> <float 1.500000e+00, float 2.500000e+00>
}
/* Variables and functions */
int get_filesize(char *);
unsigned char *load_textfile(char *, int);
unsigned char *dynamic_from_file(char *arg1, int *data_size) {
  char *filename = arg1;
  0;
  *data_size = get_filesize(filename);
  return load_textfile(filename, *data_size);
}


x86 assembly (clang, -O0):
<dynamic_from_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <get_filesize@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <load_textfile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dynamic_from_file>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <get_filesize@plt>
mov    %eax,(%r14)
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <load_textfile@plt>

LLVM IR (-O0):
define i8* @dynamic_from_file(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = call i32 @get_filesize(i8* %7)
%9 = load i32*, i32** %4
store i32 %8, i32* %9
%10 = load i8*, i8** %5
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = call i8* @load_textfile(i8* %10, i32 %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @dynamic_from_file(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @get_filesize(i8* %0)
store i32 %3, i32* %1
%4 = tail call i8* @load_textfile(i8* %0, i32 %3)
ret i8* %4
}
int test_imm_FFuint8_reg(unsigned char val) {
  return ((val) & (0xFF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FFuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xff,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FFuint8_reg>:
test   %edi,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FFuint8_reg(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
struct tm *gmtime(int /*<<< orphan*/ *);
int strftime(char *, int, char *, struct tm *);
char *strtime(time_t *time) {
  static char buf[64];
  struct tm *tm = gmtime(time);
  if (strftime(buf, sizeof(buf), "%F %T", tm) < 1)
    buf[0] = '\0';
  return buf;
}


x86 assembly (clang, -O0):
<strtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <gmtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0x2efc(%rip),%rdi
mov    $0x40,%esi
lea    0xeb0(%rip),%rdx
call   1030 <strftime@plt>
cmp    $0x1,%eax
jge    1165 <strtime+0x45>
movb   $0x0,0x2edb(%rip)
lea    0x2ed4(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtime>:
push   %rax
call   1040 <gmtime@plt>
lea    0x2f13(%rip),%rdi
lea    0xecc(%rip),%rdx
mov    $0x40,%esi
mov    %rax,%rcx
call   1030 <strftime@plt>
test   %eax,%eax
jg     114c <strtime+0x2c>
movb   $0x0,0x2ef4(%rip)
lea    0x2eed(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@strtime.buf = internal global [64 x i8] zeroinitializer
@.str = [6 x i8] c"%F %T\00"
define i8* @strtime(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.tm*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call %struct.tm* @gmtime(i32* %4)
store %struct.tm* %5, %struct.tm** %3
%6 = load %struct.tm*, %struct.tm** %3
%7 = call i32 @strftime(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @strtime.buf, i64 0, i64 0), i32 64, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
%8 = icmp slt i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %1
store i8 0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @strtime.buf, i64 0, i64 0)
br label %10
10: ; preds = %9, %1
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @strtime.buf, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@strtime.buf = internal global [64 x i8] zeroinitializer
@.str = [6 x i8] c"%F %T\00"
define i8* @strtime(i32* %0) {
%2 = tail call %struct.tm* @gmtime(i32* %0)
%3 = tail call i32 @strftime(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @strtime.buf, i64 0, i64 0), i32 64, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.tm* %2)
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %1
store i8 0, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @strtime.buf, i64 0, i64 0)
br label %6
6: ; preds = %5, %1
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @strtime.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ test_and();
int /*<<< orphan*/ test_not();
int /*<<< orphan*/ test_or();
int /*<<< orphan*/ test_shift();
int /*<<< orphan*/ test_xor();
int main() {
  test_shift();
  test_or();
  test_xor();
  test_and();
  test_not();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_shift@plt>
mov    $0x0,%al
call   1050 <test_or@plt>
mov    $0x0,%al
call   1030 <test_xor@plt>
mov    $0x0,%al
call   1070 <test_and@plt>
mov    $0x0,%al
call   1060 <test_not@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_shift@plt>
xor    %eax,%eax
call   1050 <test_or@plt>
xor    %eax,%eax
call   1030 <test_xor@plt>
xor    %eax,%eax
call   1070 <test_and@plt>
xor    %eax,%eax
call   1060 <test_not@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_shift()
%3 = call i32 (...) @test_or()
%4 = call i32 (...) @test_xor()
%5 = call i32 (...) @test_and()
%6 = call i32 (...) @test_not()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_shift()
%2 = tail call i32 (...) @test_or()
%3 = tail call i32 (...) @test_xor()
%4 = tail call i32 (...) @test_and()
%5 = tail call i32 (...) @test_not()
ret i32 0
}
/* Variables and functions */
int qran();
int qran_range(int min, int max) { return (qran() * (max - min) >> 13) + min; }


x86 assembly (clang, -O0):
<qran_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <qran@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
imul   %ecx,%eax
sar    $0xd,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qran_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <qran@plt>
sub    %ebp,%ebx
imul   %ebx,%eax
sar    $0xd,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @qran_range(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @qran()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = mul nsw i32 %5, %8
%10 = ashr i32 %9, 13
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @qran_range(i32 %0, i32 %1) {
%3 = tail call i32 (...) @qran()
%4 = sub nsw i32 %1, %0
%5 = mul nsw i32 %3, %4
%6 = ashr i32 %5, 13
%7 = add nsw i32 %6, %0
ret i32 %7
}
void gtk_bindings_activate_event() {}


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

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

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

LLVM IR (-O2):
define void @gtk_bindings_activate_event() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int read(int, char *, int);
int serverRead(int fd, char *buffer) {
  assert(buffer != NULL);
  memset(buffer, 0, 4096);
  return read(fd, buffer, 4096);
}


x86 assembly (clang, -O0):
<serverRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x1000,%edx
call   1040 <read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serverRead>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1030 <memset@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1000,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <read@plt>

LLVM IR (-O0):
define i32 @serverRead(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 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %4
%10 = call i32 @memset(i8* %9, i32 0, i32 4096)
%11 = load i32, i32* %3
%12 = load i8*, i8** %4
%13 = call i32 @read(i32 %11, i8* %12, i32 4096)
ret i32 %13
}

LLVM IR (-O2):
define i32 @serverRead(i32 %0, i8* %1) {
%3 = icmp ne i8* %1, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @memset(i8* %1, i32 0, i32 4096)
%7 = tail call i32 @read(i32 %0, i8* %1, i32 4096)
ret i32 %7
}