#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 run_test(int, char const **, int, int *, char const **);
int test_short_with_arg_after_eq(void) {
  int argc = 2;
  const char *argv[] = {"/some/path/tr-getopt-test", "-o=/tmp/outfile"};
  int expected_n = 1;
  int expected_c[] = {'o'};
  const char *expected_optarg[] = {"/tmp/outfile"};
  return run_test(argc, argv, expected_n, expected_c, expected_optarg);
}


x86 assembly (clang, -O0):
<test_short_with_arg_after_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x2,-0x4(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x24(%rbp)
mov    0xeea(%rip),%eax
mov    %eax,-0x28(%rbp)
mov    0x2cc4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    -0x28(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1030 <run_test@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_short_with_arg_after_eq>:
sub    $0x28,%rsp
movaps 0x2cf5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x6f,0x4(%rsp)
lea    0xeee(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x10(%rsp),%rsi
lea    0x4(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <run_test@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"/some/path/tr-getopt-test\00"
@.str.1 = [16 x i8] c"-o=/tmp/outfile\00"
@__const.test_short_with_arg_after_eq.argv = [2 x i8*] [i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0)]
@__const.test_short_with_arg_after_eq.expected_c = [1 x i32] [i32 111]
@.str.2 = [13 x i8] c"/tmp/outfile\00"
@__const.test_short_with_arg_after_eq.expected_optarg = [1 x i8*] [i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i32 0, i32 0)]
define i32 @test_short_with_arg_after_eq() {
%1 = alloca i32
%2 = alloca [2 x i8*]
%3 = alloca i32
%4 = alloca [1 x i32]
%5 = alloca [1 x i8*]
store i32 2, i32* %1
%6 = bitcast [2 x i8*]* %2 to i8*
store i32 1, i32* %3
%7 = bitcast [1 x i32]* %4 to i8*
%8 = bitcast [1 x i8*]* %5 to i8*
%9 = load i32, i32* %1
%10 = getelementptr inbounds [2 x i8*], [2 x i8*]* %2, i64 0, i64 0
%11 = load i32, i32* %3
%12 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
%13 = getelementptr inbounds [1 x i8*], [1 x i8*]* %5, i64 0, i64 0
%14 = call i32 @run_test(i32 %9, i8** %10, i32 %11, i32* %12, i8** %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [26 x i8] c"/some/path/tr-getopt-test\00"
@.str.1 = [16 x i8] c"-o=/tmp/outfile\00"
@__const.test_short_with_arg_after_eq.argv = [2 x i8*] [i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0)]
@.str.2 = [13 x i8] c"/tmp/outfile\00"
define i32 @test_short_with_arg_after_eq() {
%1 = alloca [2 x i8*]
%2 = alloca [1 x i32]
%3 = alloca [1 x i8*]
%4 = bitcast [2 x i8*]* %1 to i8*
%5 = bitcast [1 x i32]* %2 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 111, i32* %6
%7 = bitcast [1 x i8*]* %3 to i8*
%8 = bitcast [1 x i8*]* %3 to i64*
store i64 ptrtoint ([13 x i8]* @.str.2 to i64), i64* %8
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%10 = getelementptr inbounds [1 x i8*], [1 x i8*]* %3, i64 0, i64 0
%11 = call i32 @run_test(i32 2, i8** %9, i32 1, i32* %6, i8** %10)
ret i32 %11
}