xunge/DecIR huggingface dataset:
void rop3_119_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D & S;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_119_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_119_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
and    %sil,%cl
mov    %ecx,%eax
xor    %sil,%al
or     %dl,%cl
not    %cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_119_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %7
%19 = load i8, i8* %7
%20 = zext i8 %19 to i32
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = and i32 %20, %22
%24 = load i8, i8* %7
%25 = zext i8 %24 to i32
%26 = load i8, i8* %6
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = and i32 %25, %28
%30 = or i32 %23, %29
%31 = load i8, i8* %6
%32 = zext i8 %31 to i32
%33 = load i8, i8* %5
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = and i32 %36, %39
%41 = or i32 %30, %40
%42 = trunc i32 %41 to i8
%43 = load i8*, i8** %4
store i8 %42, i8* %43
ret void
}

LLVM IR (-O2):
define void @rop3_119_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = xor i8 %5, %1
%7 = or i8 %5, %2
%8 = xor i8 %7, -1
%9 = xor i8 %1, -1
%10 = and i8 %9, %2
%11 = and i8 %10, %4
%12 = or i8 %11, %8
%13 = or i8 %12, %6
store i8 %13, i8* %0
ret void
}
/* Variables and functions */
char *intToRoman(int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s\n", intToRoman(3499));
  printf("%s\n", intToRoman(1234));
  printf("%s\n", intToRoman(531));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xdab,%edi
call   1030 <intToRoman@plt>
mov    %rax,%rsi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4d2,%edi
call   1030 <intToRoman@plt>
mov    %rax,%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x213,%edi
call   1030 <intToRoman@plt>
mov    %rax,%rsi
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xdab,%edi
call   1030 <intToRoman@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    $0x4d2,%edi
call   1030 <intToRoman@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    $0x213,%edi
call   1030 <intToRoman@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* @intToRoman(i32 3499)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i8* @intToRoman(i32 1234)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i8* @intToRoman(i32 531)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @intToRoman(i32 3499)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i8* @intToRoman(i32 1234)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i8* @intToRoman(i32 531)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ phy_mii_write0_();
int /*<<< orphan*/ phy_mii_write1_();
void phy_trans_1_to_0_(void) {
  phy_mii_write1_();
  phy_mii_write0_();
}


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

x86 assembly (clang, -O2):
<phy_trans_1_to_0_>:
push   %rax
xor    %eax,%eax
call   1040 <phy_mii_write1_@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <phy_mii_write0_@plt>

LLVM IR (-O0):
define void @phy_trans_1_to_0_() {
%1 = call i32 (...) @phy_mii_write1_()
%2 = call i32 (...) @phy_mii_write0_()
ret void
}

LLVM IR (-O2):
define void @phy_trans_1_to_0_() {
%1 = tail call i32 (...) @phy_mii_write1_()
%2 = tail call i32 (...) @phy_mii_write0_()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int ft_free(void **ptr) {
  if (*ptr != NULL) {
    free(*ptr);
    *ptr = NULL;
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <ft_free+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <ft_free+0x18>
call   1030 <free@plt>
movq   $0x0,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
char *my_alloc(int size, int lnum, char *fe) {
  char *ptr;
  ptr = (char *)malloc(size);
  if (ptr == 0) {
    fprintf(stderr, "Memory allocation bombed on line %d in %s\n", lnum, fe);
  }
  return (ptr);
}


x86 assembly (clang, -O0):
<my_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1165 <my_alloc+0x45>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xea0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_alloc>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <my_alloc+0x30>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    %ebp,%edx
mov    %r14,%rcx
call   1030 <fprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Memory allocation bombed on line %d in %s\0A\00"
define i8* @my_alloc(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i32, i32* %4
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i32, i32* @stderr
%15 = load i32, i32* %5
%16 = load i8*, i8** %6
%17 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %15, i8* %16)
br label %18
18: ; preds = %13, %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Memory allocation bombed on line %d in %s\0A\00"
define i8* @my_alloc(i32 %0, i32 %1, i8* %2) {
%4 = tail call i64 @malloc(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
br label %9
9: ; preds = %6, %3
%10 = inttoptr i64 %4 to i8*
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ itracku_rd_deinit();
void itracku_rt_deinit(void) { itracku_rd_deinit(); }


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

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

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

LLVM IR (-O2):
define void @itracku_rt_deinit() {
%1 = tail call i32 (...) @itracku_rd_deinit()
ret void
}
/* Type definitions */
struct sigaction {
  int /*<<< orphan*/ sa_mask;
  int /*<<< orphan*/ sa_handler;
};

/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             int /*<<< orphan*/ *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void noSIGPIPE() {
  struct sigaction sa;
  sa.sa_handler = SIG_IGN;
  sigemptyset(&sa.sa_mask);
  (void)sigaction(SIGPIPE, &sa, NULL);
}


x86 assembly (clang, -O0):
<noSIGPIPE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noSIGPIPE>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { i32, i32 }
@SIG_IGN = global i32 0
@SIGPIPE = global i32 0
define void @noSIGPIPE() {
%1 = alloca %struct.sigaction
%2 = load i32, i32* @SIG_IGN
%3 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 1
store i32 %2, i32* %3
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 0
%5 = call i32 @sigemptyset(i32* %4)
%6 = load i32, i32* @SIGPIPE
%7 = call i32 @sigaction(i32 %6, %struct.sigaction* %1, i32* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { i32, i32 }
@SIG_IGN = global i32 0
@SIGPIPE = global i32 0
define void @noSIGPIPE() {
%1 = alloca %struct.sigaction
%2 = bitcast %struct.sigaction* %1 to i8*
%3 = load i32, i32* @SIG_IGN
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 1
store i32 %3, i32* %4
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 0
%6 = call i32 @sigemptyset(i32* %5)
%7 = load i32, i32* @SIGPIPE
%8 = call i32 @sigaction(i32 %7, %struct.sigaction* %1, i32* null)
ret void
}
void start_trigger() {}


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

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

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

LLVM IR (-O2):
define void @start_trigger() {
ret void
}
/* Variables and functions */
int tcpSetBlock(char *, int, int);
int tcpNonBlock(char *err, int fd) { return tcpSetBlock(err, fd, 1); }


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

x86 assembly (clang, -O2):
<tcpNonBlock>:
mov    $0x1,%edx
jmp    1030 <tcpSetBlock@plt>

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

LLVM IR (-O2):
define i32 @tcpNonBlock(i8* %0, i32 %1) {
%3 = tail call i32 @tcpSetBlock(i8* %0, i32 %1, i32 1)
ret i32 %3
}
/* Type definitions */
struct glist_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ glist_fprint(struct glist_list *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void glist_print(struct glist_list *list) { glist_fprint(list, stdout); }


x86 assembly (clang, -O0):
<glist_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <glist_fprint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glist_print>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <glist_fprint@plt>

LLVM IR (-O0):
%struct.glist_list = type { i32 }
@stdout = global i32 0
define void @glist_print(%struct.glist_list* %0) {
%2 = alloca %struct.glist_list*
store %struct.glist_list* %0, %struct.glist_list** %2
%3 = load %struct.glist_list*, %struct.glist_list** %2
%4 = load i32, i32* @stdout
%5 = call i32 @glist_fprint(%struct.glist_list* %3, i32 %4)
ret void
}

LLVM IR (-O2):
%struct.glist_list = type { i32 }
@stdout = global i32 0
define void @glist_print(%struct.glist_list* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @glist_fprint(%struct.glist_list* %0, i32 %2)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int UINT32_C(int);
void fiat_p384_mulx_u32(uint32_t *out1, uint32_t *out2, uint32_t arg1,
                        uint32_t arg2) {
  uint64_t x1;
  uint32_t x2;
  uint32_t x3;
  x1 = ((uint64_t)arg1 * arg2);
  x2 = (uint32_t)(x1 & UINT32_C(0xffffffff));
  x3 = (uint32_t)(x1 >> 32);
  *out1 = x2;
  *out2 = x3;
}


x86 assembly (clang, -O0):
<fiat_p384_mulx_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0xffffffff,%edi
call   1030 <UINT32_C@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_p384_mulx_u32>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rdi,%r14
imul   %ecx,%ebx
mov    $0xffffffff,%edi
call   1030 <UINT32_C@plt>
and    %ebx,%eax
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @fiat_p384_mulx_u32(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = mul nsw i32 %12, %13
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = call i32 @UINT32_C(i32 -1)
%17 = and i32 %15, %16
store i32 %17, i32* %10
%18 = load i32, i32* %9
%19 = ashr i32 %18, 32
store i32 %19, i32* %11
%20 = load i32, i32* %10
%21 = load i32*, i32** %5
store i32 %20, i32* %21
%22 = load i32, i32* %11
%23 = load i32*, i32** %6
store i32 %22, i32* %23
ret void
}

LLVM IR (-O2):
define void @fiat_p384_mulx_u32(i32* nocapture writeonly %0, i32* nocapture readnone %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %3, %2
%6 = tail call i32 @UINT32_C(i32 -1)
%7 = and i32 %6, %5
store i32 %7, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned int);
void KeccakP200_OverwriteWithZeroes(void *state, unsigned int byteCount) {
  memset(state, 0, byteCount);
}


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

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

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

LLVM IR (-O2):
define void @KeccakP200_OverwriteWithZeroes(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
ret void
}
/* Variables and functions */
int _tolower(int);
int tolower(int c) {
  if (c < 'A' || c > 'Z')
    return c;
  return _tolower(c);
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     112f <tolower+0x1f>
cmpl   $0x5a,-0x8(%rbp)
jle    113a <tolower+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <tolower+0x35>
mov    -0x8(%rbp),%edi
call   1030 <_tolower@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
lea    -0x5b(%rdi),%eax
cmp    $0xffffffe6,%eax
jae    111b <tolower+0xb>
mov    %edi,%eax
ret
jmp    1030 <_tolower@plt>

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 65
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 90
br i1 %8, label %9, label %11
9: ; preds = %6, %1
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %14
11: ; preds = %6
%12 = load i32, i32* %3
%13 = call i32 @_tolower(i32 %12)
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = add i32 %0, -91
%3 = icmp ult i32 %2, -26
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @_tolower(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %0, %1 ]
ret i32 %7
}
void winsockCleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @winsockCleanup() {
ret void
}
void RTAvlrPVRangeRemove(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrPVRangeRemove() {
ret void
}
struct packet_sock *pkt_sk(struct sock *sk) {
  return (struct packet_sock *)sk;
}


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

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

LLVM IR (-O0):
%struct.packet_sock = type opaque
%struct.sock = type opaque
define %struct.packet_sock* @pkt_sk(%struct.sock* %0) {
%2 = alloca %struct.sock*
store %struct.sock* %0, %struct.sock** %2
%3 = load %struct.sock*, %struct.sock** %2
%4 = bitcast %struct.sock* %3 to %struct.packet_sock*
ret %struct.packet_sock* %4
}

LLVM IR (-O2):
%struct.packet_sock = type opaque
%struct.sock = type opaque
define %struct.packet_sock* @pkt_sk(%struct.sock* readnone %0) {
%2 = bitcast %struct.sock* %0 to %struct.packet_sock*
ret %struct.packet_sock* %2
}
void __DELETE_java_lang_ref_WeakReference(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_ref_WeakReference(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int test_imm_24uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x24 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_24uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 36
%6 = icmp ne i64 %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_24uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 2359296
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ swap(char *, int, int);
void reverse_recur(char s[], int start, int end) {
  if (start >= end) {
    return;
  }
  swap(s, start, end);
  reverse_recur(s, start + 1, end - 1);
}


x86 assembly (clang, -O0):
<reverse_recur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1143 <reverse_recur+0x23>
jmp    1167 <reverse_recur+0x47>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <swap@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
sub    $0x1,%edx
call   1040 <reverse_recur@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_recur>:
push   %rbp
push   %r14
push   %rbx
cmp    %edx,%esi
jge    1136 <reverse_recur+0x26>
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
nop
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <swap@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    %ebx,%ebp
jl     1120 <reverse_recur+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @reverse_recur(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = icmp sge i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %3
br label %21
11: ; preds = %3
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @swap(i8* %12, i32 %13, i32 %14)
%16 = load i8*, i8** %4
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
%19 = load i32, i32* %6
%20 = sub nsw i32 %19, 1
br label %21
21: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
define void @reverse_recur(i8* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ %2, %3 ]
%7 = phi i32 [ %9, %5 ], [ %1, %3 ]
%8 = tail call i32 @swap(i8* %0, i32 %7, i32 %6)
%9 = add nsw i32 %7, 1
%10 = add nsw i32 %6, -1
%11 = icmp slt i32 %9, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long int t;
  scanf("%lld", &t);
  if ((t & (t - 1)) == 0)
    printf("TAK\n");
  else
    printf("NIE\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
jne    1169 <main+0x49>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    1175 <main+0x55>
lea    0xe9a(%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
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%rax
lea    -0x1(%rax),%rcx
test   %rcx,%rax
lea    0xec7(%rip),%rax
lea    0xebc(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
@str = [4 x i8] c"NIE\00"
@str.3 = [4 x i8] c"TAK\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i64 @llvm.ctpop.i64(i64 %4)
%6 = icmp ult i64 %5, 2
%7 = select i1 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t mcnet_read_uint8(uint8_t *in) { return *((uint8_t *)(in)); }


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

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

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

LLVM IR (-O2):
define i32 @mcnet_read_uint8(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
int test_imm_DBuint8_reg(unsigned char val) {
  return ((val) & (-0xDB << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DBuint8_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, -219
%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_DBuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 37
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ UP3DCOMM_Close();
void UP3D_Close() { UP3DCOMM_Close(); }


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

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

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

LLVM IR (-O2):
define void @UP3D_Close() {
%1 = tail call i32 (...) @UP3DCOMM_Close()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DecodeEaD_xxxxdddxssmmmrrr();
int /*<<< orphan*/ DoBinOr(int /*<<< orphan*/);
void DoCodeOrEaD(void) { DoBinOr(DecodeEaD_xxxxdddxssmmmrrr()); }


x86 assembly (clang, -O0):
<DoCodeOrEaD>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <DecodeEaD_xxxxdddxssmmmrrr@plt>
mov    %eax,%edi
call   1030 <DoBinOr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCodeOrEaD>:
push   %rax
xor    %eax,%eax
call   1040 <DecodeEaD_xxxxdddxssmmmrrr@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <DoBinOr@plt>

LLVM IR (-O0):
define void @DoCodeOrEaD() {
%1 = call i32 (...) @DecodeEaD_xxxxdddxssmmmrrr()
%2 = call i32 @DoBinOr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DoCodeOrEaD() {
%1 = tail call i32 (...) @DecodeEaD_xxxxdddxssmmmrrr()
%2 = tail call i32 @DoBinOr(i32 %1)
ret void
}
void minimum2INT(int i) {}


x86 assembly (clang, -O0):
<minimum2INT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @minimum2INT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @minimum2INT(i32 %0) {
ret void
}
int INHERENT_spawn() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @INHERENT_spawn() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int low;
  int mid;
  int high;
  assume(low == 0 && mid >= 1 && high == 2 * mid);
  while (mid > 0) {
    low = low + 1;
    high = high - 1;
    mid = mid - 1;
  }
  assert(low == high);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    115e <main+0x3e>
xor    %eax,%eax
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jl     115e <main+0x3e>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x0,-0xc(%rbp)
jle    1195 <main+0x75>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <main+0x4b>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <assume@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = mul nsw i32 2, %12
%14 = icmp eq i32 %11, %13
br label %15
15: ; preds = %10, %7, %0
%16 = phi i1 [ false, %7 ], [ false, %0 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
%18 = call i32 @assume(i32 %17)
br label %19
19: ; preds = %22, %15
%20 = load i32, i32* %3
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
%25 = load i32, i32* %4
%26 = sub nsw i32 %25, 1
store i32 %26, i32* %4
%27 = load i32, i32* %3
%28 = sub nsw i32 %27, 1
store i32 %28, i32* %3
br label %19
29: ; preds = %19
%30 = load i32, i32* %2
%31 = load i32, i32* %4
%32 = icmp eq i32 %30, %31
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvSendSerialCommandEx(char byBoardNum, char byCommand, short wData,
                          char bWaitForAck) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvSendSerialCommandEx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dx,%cx
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %al,-0x5(%rbp)
lea    0xec8(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvSendSerialCommandEx(i8 signext %0, i8 signext %1, i16 signext %2, i8 signext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i16
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i16 %2, i16* %7
store i8 %3, i8* %8
%9 = call i32 @notify_pvcall(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"f\00"
define i32 @pvSendSerialCommandEx(i8 signext %0, i8 signext %1, i16 signext %2, i8 signext %3) {
%5 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double _log(double);
double d2d(double);
double log(double x) { return d2d(_log(d2d(x))); }


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <d2d@plt>
call   1030 <_log@plt>
call   1040 <d2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log>:
push   %rax
call   1040 <d2d@plt>
call   1030 <_log@plt>
pop    %rax
jmp    1040 <d2d@plt>

LLVM IR (-O0):
define double @log(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @d2d(double %3)
%5 = call double @_log(double %4)
%6 = call double @d2d(double %5)
ret double %6
}

LLVM IR (-O2):
define double @log(double %0) {
%2 = tail call double @d2d(double %0)
%3 = tail call double @_log(double %2)
%4 = tail call double @d2d(double %3)
ret double %4
}
void tt_complex_sub(double *out, const double *in1, const double *in2) {
  out[0] = in1[0] - in2[0];
  out[1] = in1[1] - in2[1];
}


x86 assembly (clang, -O0):
<tt_complex_sub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tt_complex_sub>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
subsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @tt_complex_sub(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
ret void
}

LLVM IR (-O2):
define void @tt_complex_sub(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int _XRead() {
  printf("_XRead called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"_XRead called\0A\00"
define i32 @_XRead() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"_XRead called\00"
define i32 @_XRead() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void fd161(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  a : {
    typedef int(*g)[n];
  p024A:
    goto p024A;
    goto a;
  P024A:
    goto P024A;
    0;
  };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd161>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd161+0x7>

x86 assembly (clang, -O2):
<fd161>:
jmp    1100 <fd161>

LLVM IR (-O0):
define void @fd161(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %23
%27 = load i32, i32* %2
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %29, %26
br label %29
30: ; preds = %30
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd161(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void local_irq_restore(unsigned long flags __attribute__((unused))) {
  __asm__ __volatile__("" : : : "memory");
}


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

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

LLVM IR (-O0):
define void @local_irq_restore(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret void
}

LLVM IR (-O2):
define void @local_irq_restore(i64 %0) {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Lcd4_Cmd(int);
void Lcd4_Shift_Right() {
  Lcd4_Cmd(0x01);
  Lcd4_Cmd(0x0C);
}


x86 assembly (clang, -O0):
<Lcd4_Shift_Right>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <Lcd4_Cmd@plt>
mov    $0xc,%edi
call   1030 <Lcd4_Cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lcd4_Shift_Right>:
push   %rax
mov    $0x1,%edi
call   1030 <Lcd4_Cmd@plt>
mov    $0xc,%edi
pop    %rax
jmp    1030 <Lcd4_Cmd@plt>

LLVM IR (-O0):
define void @Lcd4_Shift_Right() {
%1 = call i32 @Lcd4_Cmd(i32 1)
%2 = call i32 @Lcd4_Cmd(i32 12)
ret void
}

LLVM IR (-O2):
define void @Lcd4_Shift_Right() {
%1 = tail call i32 @Lcd4_Cmd(i32 1)
%2 = tail call i32 @Lcd4_Cmd(i32 12)
ret void
}
int pcm037_eet_init_devices(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pcm037_eet_init_devices() {
ret i32 0
}
/* Variables and functions */
int write(int, unsigned char *, int);
int i2c_write(int fd, unsigned char data) {
  int ret = 0;
  ret = write(fd, &data, 1);
  if ((ret == -1) || (ret != 1))
    return -1;
  else
    return (ret);
}


x86 assembly (clang, -O0):
<i2c_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
je     1150 <i2c_write+0x40>
cmpl   $0x1,-0x10(%rbp)
je     115c <i2c_write+0x4c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <i2c_write+0x52>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_write>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @i2c_write(i32 %0, i8 zeroext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call i32 @write(i32 %0, i8* %3, i32 1)
%5 = icmp eq i32 %4, 1
%6 = select i1 %5, i32 1, i32 -1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_28_recursive(double *, int);
void helper_double_28(double *buf) { helper_double_28_recursive(buf, 28); }


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

x86 assembly (clang, -O2):
<helper_double_28>:
mov    $0x1c,%esi
jmp    1030 <helper_double_28_recursive@plt>

LLVM IR (-O0):
define void @helper_double_28(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @helper_double_28_recursive(double* %3, i32 28)
ret void
}

LLVM IR (-O2):
define void @helper_double_28(double* %0) {
%2 = tail call i32 @helper_double_28_recursive(double* %0, i32 28)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ b_main();
int main() {
  b_main();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <b_main@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <b_main@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @b_main()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @b_main()
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ log_write_ln(char *);
int /*<<< orphan*/ test_run_all_tests();
int main(int argc, const char *argv[]) {
  test_run_all_tests();
  log_write_ln("main: done");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <test_run_all_tests@plt>
lea    0xebc(%rip),%rdi
call   1040 <log_write_ln@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"main: done\00"
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 = call i32 (...) @test_run_all_tests()
%7 = call i32 @log_write_ln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"main: done\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_run_all_tests()
%4 = tail call i32 @log_write_ln(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}