#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void test_ternary() {
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          68, 51, (1 + 2) ? 51 : 52);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          69, 52, (1 - 1) ? 51 : 52);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          70, 26, (1 - 1) ? 51 : 52 / 2);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          71, 17, (1 - 0) ? 51 / 3 : 52);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          73, 52, 0 ?: 52);
  ;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c",
          74, 3, (1 + 2) ?: 52);
  ;
}


x86 assembly (clang, -O0):
<test_ternary>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x44,%esi
mov    $0x33,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
lea    0xecd(%rip),%rdi
mov    $0x45,%esi
mov    $0x34,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
lea    0xeb5(%rip),%rdi
mov    $0x46,%esi
mov    $0x1a,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
lea    0xe9d(%rip),%rdi
mov    $0x47,%esi
mov    $0x11,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
lea    0xe85(%rip),%rdi
mov    $0x49,%esi
mov    $0x34,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
lea    0xe6d(%rip),%rdi
mov    $0x4a,%esi
mov    $0x3,%ecx
mov    %ecx,%edx
call   1030 <fexpect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ternary>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x44,%esi
mov    $0x33,%edx
mov    $0x33,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x45,%esi
mov    $0x34,%edx
mov    $0x34,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
mov    $0x1a,%edx
mov    $0x1a,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
mov    $0x11,%edx
mov    $0x11,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x49,%esi
mov    $0x34,%edx
mov    $0x34,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x4a,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
pop    %rbx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [128 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c\00"
define void @test_ternary() {
%1 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 68, i32 51, i32 51)
%2 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 69, i32 52, i32 52)
%3 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 70, i32 26, i32 26)
%4 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 71, i32 17, i32 17)
%5 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 73, i32 52, i32 52)
%6 = call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 74, i32 3, i32 3)
ret void
}

LLVM IR (-O2):
@.str = [128 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/arith.c\00"
define void @test_ternary() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 68, i32 51, i32 51)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 69, i32 52, i32 52)
%3 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 70, i32 26, i32 26)
%4 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 71, i32 17, i32 17)
%5 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 73, i32 52, i32 52)
%6 = tail call i32 @fexpect(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0), i32 74, i32 3, i32 3)
ret void
}